Skip to content

Commit 769d7ec

Browse files
thomasnemerdylanhitt
authored andcommitted
fix: route stderr to stderr and not stdout when using WithStandardStreams
1 parent 6f047a5 commit 769d7ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func WithCustomBaseCommand(baseCommand *exec.Cmd) func(c *Command) {
113113
//
114114
func WithStandardStreams(c *Command) {
115115
c.StdoutWriter = io.MultiWriter(os.Stdout, &c.stdout, &c.combined)
116-
c.StderrWriter = io.MultiWriter(os.Stderr, &c.stdout, &c.combined)
116+
c.StderrWriter = io.MultiWriter(os.Stderr, &c.stderr, &c.combined)
117117
}
118118

119119
// WithCustomStdout allows to add custom writers to stdout

0 commit comments

Comments
 (0)