Browse Source

fix docker run -a stderr

Victor Vieux 11 years ago
parent
commit
3ba279a370
1 changed files with 2 additions and 2 deletions
  1. 2 2
      commands.go

+ 2 - 2
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