From f4099f398aba5df393dff6badaee5fa178fee0d9 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 24 Oct 2019 12:14:12 +0200 Subject: [PATCH] Fix WithCustomStdout and WithCustomStderr functions which had overwritten the stdout/stderr writers --- command.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/command.go b/command.go index 451b7b9..28597c8 100644 --- a/command.go +++ b/command.go @@ -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) } } @@ -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) } }