🐛 修复 Windows WebTerminal

This commit is contained in:
naiba
2021-08-19 00:04:09 +08:00
parent 2d30b2cf47
commit 7990689949
10 changed files with 26 additions and 9 deletions

View File

@@ -73,12 +73,12 @@ func Start() (*Pty, error) {
if err != nil {
return nil, err
}
tty, err := winpty.Open(path, shellPath)
tty, err := winpty.OpenDefault(path, shellPath)
return &Pty{tty: tty}, err
}
func (pty *Pty) Write(p []byte) (n int, err error) {
return pty.tty.StdIn.Read(p)
return pty.tty.StdIn.Write(p)
}
func (pty *Pty) Read(p []byte) (n int, err error) {