Closed slimsag closed 8 years ago
LGTM
The same change should be done for the cmd.Env = []string{"GIT_SSH=" + gitSSHWrapper}
line in the block above.
Edit: Never mind, I just realized it's clearing all previous environment variables, if any, since it's directly setting the Env
variable rather than append
ing to it. But I'm unsure if that makes sense in the general case; it also seems inconsistent.
I'd also suggest just implementing a Set
method instead of doing Unset
and then a manual append
. You can copy a tested implementation from here.
or else the new one will not take effect if there is a prior one in play.
This was discovered to be incorrect as part of a separate / unrelated change, but nonetheless was incorrect code.