return stdout / stderr errors after

This commit is contained in:
Shreyas Goenka 2025-03-03 19:32:43 +01:00
parent 88b6dc8e16
commit fd2600cbea
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 8 additions and 8 deletions

View File

@ -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
},
}