mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
Return proper exit code on ssh with TTY (#3192)
* Return proper exit code on ssh with TTY Signed-off-by: Spike Curtis <spike@coder.com> * Fix revive lint Signed-off-by: Spike Curtis <spike@coder.com> * Fix Windows exit code for missing command Signed-off-by: Spike Curtis <spike@coder.com> * Fix close error handling on agent TTY Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
@@ -27,7 +26,7 @@ func New(t *testing.T) *PTY {
|
||||
return create(t, ptty, "cmd")
|
||||
}
|
||||
|
||||
func Start(t *testing.T, cmd *exec.Cmd) (*PTY, *os.Process) {
|
||||
func Start(t *testing.T, cmd *exec.Cmd) (*PTY, pty.Process) {
|
||||
ptty, ps, err := pty.Start(cmd)
|
||||
require.NoError(t, err)
|
||||
return create(t, ptty, cmd.Args[0]), ps
|
||||
|
||||
Reference in New Issue
Block a user