Skip to content

Commit 50a88b0

Browse files
committed
Fix Windows exit code for missing command
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent 8f68565 commit 50a88b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agent/agent_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ func TestAgent(t *testing.T) {
121121
err = session.Wait()
122122
exitErr := &ssh.ExitError{}
123123
require.True(t, xerrors.As(err, &exitErr))
124-
assert.Equal(t, 127, exitErr.ExitStatus())
124+
if runtime.GOOS == "windows" {
125+
assert.Equal(t, 1, exitErr.ExitStatus())
126+
} else {
127+
assert.Equal(t, 127, exitErr.ExitStatus())
128+
}
125129
})
126130

127131
t.Run("LocalForwarding", func(t *testing.T) {

0 commit comments

Comments
 (0)