From 0fc7c11c04df10b1699bd90b7d1762dffd23e0f7 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:05:14 +0200 Subject: [PATCH] fix for Julia 1.0 --- src/GitHubActions.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GitHubActions.jl b/src/GitHubActions.jl index 57090b3..052d81d 100644 --- a/src/GitHubActions.jl +++ b/src/GitHubActions.jl @@ -226,7 +226,13 @@ struct GitHubActionsLogger <: AbstractLogger end function get_gha_level() - is_debug = something(tryparse(Bool, get(ENV, "RUNNER_DEBUG", "false")), false) + env_str = get(ENV, "RUNNER_DEBUG", "false") + # `tryparse(Bool, "1")` does not work on Julia 1.0, so we special-case that value + # (which is the only documented value for `RUNNER_DEBUG`, so any other case should be + # due to the user setting it manually somehow). + env_str == "1" && return DEBUG + # Fallback for all other values: + is_debug = something(tryparse(Bool, env_str), false) return is_debug ? Debug : Info end