From 3ba279a3705b3417fea36e8d2eb7d54e95d60fad Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 4 Dec 2013 17:08:14 -0800 Subject: [PATCH] fix docker run -a stderr --- commands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands.go b/commands.go index 96c16fa268..9df91d723e 100644 --- a/commands.go +++ b/commands.go @@ -2361,7 +2361,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea defer term.RestoreTerminal(cli.terminalFd, oldState) } - if stdout != nil { + if stdout != nil || stderr != nil { receiveStdout = utils.Go(func() (err error) { defer func() { if in != nil { @@ -2401,7 +2401,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea return nil }) - if stdout != nil { + if stdout != nil || stderr != nil { if err := <-receiveStdout; err != nil { utils.Errorf("Error receiveStdout: %s", err) return err