Skip to content

Commit

Permalink
bug fix on windows cmd start
Browse files Browse the repository at this point in the history
  • Loading branch information
kcmvp committed May 24, 2024
1 parent f46c1ec commit 42b8c83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ go.work
gob
11.json
target
*.sql
6 changes: 5 additions & 1 deletion cmd/gbc/artifact/pty_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ func PtyCmdOutput(cmd *exec.Cmd, task string, formatter consoleFormatter) error
// Start the command with a pty
rc, err := func() (io.ReadCloser, error) {
if Windows() {
return cmd.StdoutPipe()
r, err := cmd.StdoutPipe()
if err != nil {
return r, err
}
return r, cmd.Start()
}
return pty.Start(cmd)
}()
Expand Down

0 comments on commit 42b8c83

Please sign in to comment.