jesseduffield.lazygit/pkg/commands/oscommands/cmd_obj_runner_win.go
Jesse Duffield b146c05578 WIP
2023-05-27 13:11:25 +10:00

24 lines
350 B
Go

//go:build windows
// +build windows
package oscommands
import (
"os/exec"
"github.com/creack/pty"
)
func (self *cmdObjRunner) getCmdHandler(cmd *exec.Cmd) (*cmdHandler, error) {
ptmx, err := pty.Start(cmd)
if err != nil {
return nil, err
}
return &cmdHandler{
stdoutPipe: ptmx,
stdinPipe: ptmx,
close: ptmx.Close,
}, nil
}