Skip to content

Commit

Permalink
Update engine.go
Browse files Browse the repository at this point in the history
The old version did not print out any log.print or other log outputs under windows (in powershell/cmd/git bash) for us.
After that change it worked. It is just a hacky solution currently. Happily awaiting feedback if this is actually a soultion.

Thanks
  • Loading branch information
Lukas authored and xiantang committed Oct 23, 2023
1 parent 22545a2 commit fb4e911
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions runner/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,15 @@ func (e *Engine) runBin() error {
go killFunc(cmd, stdout, stderr, killCh, processExit, &wg)
})

_, _ = io.Copy(os.Stdout, stdout)
_, _ = io.Copy(os.Stderr, stderr)
go func() {
_, _ = io.Copy(os.Stdout, stdout)
_, _ = cmd.Process.Wait()
}()

go func() {
_, _ = io.Copy(os.Stderr, stderr)
_, _ = cmd.Process.Wait()
}()
state, _ := cmd.Process.Wait()
close(processExit)
switch state.ExitCode() {
Expand Down

0 comments on commit fb4e911

Please sign in to comment.