Skip to content

Commit eb5b1b5

Browse files
author
Lukas
authored
fix windows not receiving log (#389)
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
1 parent 22545a2 commit eb5b1b5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

runner/engine.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,15 @@ func (e *Engine) runBin() error {
544544
go killFunc(cmd, stdout, stderr, killCh, processExit, &wg)
545545
})
546546

547-
_, _ = io.Copy(os.Stdout, stdout)
548-
_, _ = io.Copy(os.Stderr, stderr)
547+
go func() {
548+
_, _ = io.Copy(os.Stdout, stdout)
549+
_, _ = cmd.Process.Wait()
550+
}()
551+
552+
go func() {
553+
_, _ = io.Copy(os.Stderr, stderr)
554+
_, _ = cmd.Process.Wait()
555+
}()
549556
state, _ := cmd.Process.Wait()
550557
close(processExit)
551558
switch state.ExitCode() {

0 commit comments

Comments
 (0)