mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
* 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>
12 lines
280 B
Go
12 lines
280 B
Go
package pty
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
// Start the command in a TTY. The calling code must not use cmd after passing it to the PTY, and
|
|
// instead rely on the returned Process to manage the command/process.
|
|
func Start(cmd *exec.Cmd) (PTY, Process, error) {
|
|
return startPty(cmd)
|
|
}
|