From eb5b1b501bf2a69316cfc75648c2eebba98d0553 Mon Sep 17 00:00:00 2001 From: Lukas <79510586+lukaswork@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:16:24 +0200 Subject: [PATCH] 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 --- runner/engine.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/runner/engine.go b/runner/engine.go index 89426f86..b30c9c2a 100644 --- a/runner/engine.go +++ b/runner/engine.go @@ -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() {