fix: Remove quotes on GitSSH (#1043)

This commit is contained in:
Kyle Carberry
2022-04-18 15:12:39 -05:00
committed by GitHub
parent 6d948ffba2
commit e5a1c305d3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -237,7 +237,7 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
if err != nil {
return xerrors.Errorf("getting os executable: %w", err)
}
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND="%s gitssh --"`, executablePath))
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND=%s gitssh --`, executablePath))
sshPty, windowSize, isPty := session.Pty()
if isPty {
+1 -1
View File
@@ -57,7 +57,7 @@ func TestAgent(t *testing.T) {
}
output, err := session.Output(command)
require.NoError(t, err)
require.Contains(t, string(output), "gitssh --")
require.True(t, strings.HasSuffix(strings.TrimSpace(string(output)), "gitssh --"))
})
t.Run("SessionTTY", func(t *testing.T) {