Skip to content

Commit d539c21

Browse files
authored
update env var check
1 parent bf81c75 commit d539c21

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/runtests.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ end
8888

8989
# https://github.com/JuliaVersionControl/Git.jl/issues/51
9090
@testset "OpenSSH integration" begin
91-
is_ci = parse(Bool, strip(get(ENV, "CI", "false")))
92-
is_gha = parse(Bool, strip(get(ENV, "GITHUB_ACTIONS", "false")))
93-
ssh_privkey = get(ENV, "CI_READONLY_DEPLOYKEY_FOR_CI_TESTSUITE_PRIVATEKEY", nothing)
94-
if is_ci && is_gha && !isnothing(ssh_privkey)
95-
@info "This is GitHub Actions CI, so running the OpenSSH test..."
91+
ssh_privkey = get(ENV, "CI_READONLY_DEPLOYKEY_FOR_CI_TESTSUITE_PRIVATEKEY", "")
92+
if !isempty(ssh_privkey)
93+
@info "CI private key available, so running the OpenSSH test..."
9694
mktempdir() do sshprivkeydir
9795
privkey_filepath = joinpath(sshprivkeydir, "my_private_key")
9896
open(privkey_filepath, "w") do io

0 commit comments

Comments
 (0)