Skip to content

Commit ad5e71c

Browse files
committed
fix: Remove quotes on GitSSH
This was a bug @f0ssel found that was breaking gitssh.
1 parent a13ccee commit ad5e71c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

agent/agent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
237237
if err != nil {
238238
return xerrors.Errorf("getting os executable: %w", err)
239239
}
240-
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND="%s gitssh --"`, executablePath))
240+
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND=%s gitssh --`, executablePath))
241241

242242
sshPty, windowSize, isPty := session.Pty()
243243
if isPty {

agent/agent_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestAgent(t *testing.T) {
5757
}
5858
output, err := session.Output(command)
5959
require.NoError(t, err)
60-
require.Contains(t, string(output), "gitssh --")
60+
require.True(t, strings.HasSuffix(string(output), "gitssh --"))
6161
})
6262

6363
t.Run("SessionTTY", func(t *testing.T) {

0 commit comments

Comments
 (0)