You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect to see the content of stderr.
The documentation implies it should be copied to the buffer:
Otherwise, during the execution of the command a separate goroutine
reads from the process over a pipe and delivers that data to the
corresponding Writer. In this case, Wait does not complete until the
goroutine reaches EOF or encounters an error.
The process exists after writing to its stderr, so I should be able to read it to my buffer.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run CombinedOutput on a command that will error.
https://play.golang.org/p/TLNqCABOTCu
What did you expect to see?
I expect to see the content of stderr.
The documentation implies it should be copied to the buffer:
The process exists after writing to its stderr, so I should be able to read it to my buffer.
What did you see instead?
I see nothing.
If I set cmd.Stderr = os.Stderr, it is copied properly though: https://play.golang.org/p/bWlSY8F2sLo
The text was updated successfully, but these errors were encountered: