windows build now also working but without pty support.

This commit is contained in:
Erik Brakkee 2024-07-22 23:07:26 +02:00
parent 1e422dd698
commit d2801d0019

View File

@ -0,0 +1,24 @@
package terminal
import (
"github.com/gliderlabs/ssh"
"io"
"os"
"os/exec"
)
var PtySpawner = Spawner(func(sshSession ssh.Session, env []string, name string, arg ...string) (Process, error) {
return nil, nil
})
type ptyProcess struct {
cmd *exec.Cmd
f *os.File
}
func (p ptyProcess) Pipe() io.ReadWriter {
return p.f
}
func (p ptyProcess) Wait() error {
return p.cmd.Wait()
}