Skip to content

Commit

Permalink
Replace a use of withenv with setenv instead
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed Oct 31, 2023
1 parent 417e865 commit 66e383c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utilities/git.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ function git_push(
ssh = enable_ssh_verbose_b ? "ssh -vvvv" : "ssh"
git_ssh_command = isnothing(pkey_filename) ? ssh : "$(ssh) -i $pkey_filename"

withenv("GIT_SSH_COMMAND" => git_ssh_command) do
cmd = `git -c user.name="$name" -c user.email="$email" -c committer.name="$name" -c committer.email="$email" push $force_flag $remote $branch`
@debug "Attempting to run Git push command" cmd
run(cmd)
end
env2 = copy(ENV);
env2["GIT_SSH_COMMAND"] = git_ssh_command
cmd = `git -c user.name="$name" -c user.email="$email" -c committer.name="$name" -c committer.email="$email" push $force_flag $remote $branch`
@debug "Attempting to run Git push command" cmd env2["GIT_SSH_COMMAND"]
run(setenv(cmd, env2))

return nothing
end
Expand Down

0 comments on commit 66e383c

Please sign in to comment.