From fd2600cbea9438dded4503062c95026ccbb34cea Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Mon, 3 Mar 2025 19:32:43 +0100 Subject: [PATCH] return stdout / stderr errors after --- cmd/bundle/exec.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/bundle/exec.go b/cmd/bundle/exec.go index fbb4d2547..f74458d06 100644 --- a/cmd/bundle/exec.go +++ b/cmd/bundle/exec.go @@ -129,14 +129,6 @@ Example usage: } }() - if stdoutErr != nil { - return stdoutErr - } - - if stderrErr != nil { - return stderrErr - } - // Wait for the command to finish. err = childCmd.Wait() if exitErr, ok := err.(*exec.ExitError); ok { @@ -156,6 +148,14 @@ Example usage: // Wait for the goroutines to finish printing to stdout and stderr. wg.Wait() + if stdoutErr != nil { + return stdoutErr + } + + if stderrErr != nil { + return stderrErr + } + return nil }, }