Skip to content

Commit

Permalink
Fix WithCustomStdout and WithCustomStderr functions which had overwri…
Browse files Browse the repository at this point in the history
…tten the stdout/stderr writers
  • Loading branch information
SimonBaeumer committed Oct 24, 2019
1 parent b7d83e7 commit f4099f3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ func WithCustomStdout(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stdout, &c.combined)
c.StdoutWriter = NewMultiplexedWriter(writers...)

c.StderrWriter = NewMultiplexedWriter(&c.stderr, &c.combined)
}
}

Expand All @@ -97,8 +95,6 @@ func WithCustomStderr(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stderr, &c.combined)
c.StderrWriter = NewMultiplexedWriter(writers...)

c.StdoutWriter = NewMultiplexedWriter(&c.stdout, &c.combined)
}
}

Expand Down

0 comments on commit f4099f3

Please sign in to comment.