hashicorp / go-getter

Package for downloading things from a string URL using a variety of protocols.
Mozilla Public License 2.0
1.66k stars 235 forks source link

don't change GIT_SSH_COMMAND when there is no sshKeyFile #459

Closed jbardin closed 1 year ago

jbardin commented 1 year ago

The reason for setupGitEnv is to add a -i keyfile argument to GIT_SSH_COMMAND. If there is no key file, we do not need to modify the environment at all.

The problem with #300 was that it always reset GIT_SSH_COMMAND even when there was no keyfile to add, and lost the original command string.