git icon indicating copy to clipboard operation
git copied to clipboard

[BUG] GIT_SSH_COMMAND should honor GIT_SSH

Open mvorisek opened this issue 2 years ago • 0 comments

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.

image

Expected Behavior

GIT_SSH other than ssh/empty is honored.

mvorisek avatar Apr 14 '23 23:04 mvorisek