git
git copied to clipboard
[BUG] GIT_SSH_COMMAND should honor GIT_SSH
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
Currently GIT_SSH_COMMAND has hardcoded ssh path in https://github.com/npm/git/blob/v4.0.4/lib/opts.js#L5
But there is also GIT_SSH env. var honored by standard git. The GIT_SSH_COMMAND should use GIT_SSH (and quoted) instead of ssh when GIT_SSH is non-empty.
Will fix https://github.com/npm/cli/issues/2891 as I can confirm https://github.com/npm/cli/issues/2891#issuecomment-959213034 fixes the problem.

Expected Behavior
GIT_SSH other than ssh/empty is honored.