Skip to content

Commit

Permalink
fix for Julia 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ericphanson committed Sep 18, 2023
1 parent 3cddb16 commit 0fc7c11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/GitHubActions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0fc7c11

Please sign in to comment.