diff --git a/tty.go b/tty.go index c8af5dea..77dc79fc 100644 --- a/tty.go +++ b/tty.go @@ -14,6 +14,7 @@ import ( "net" "os" "os/exec" + "runtime" ) // randomPort returns a random port number that is not in use. @@ -36,6 +37,10 @@ func buildTtyCmd(port int, shell Shell) *exec.Cmd { "--writable", } + if runtime.GOOS == "windows" { + args = append(args, "-w", ".") + } + args = append(args, shell.Command...) cmd := exec.Command("ttyd", args...)