Merge pull request #7083 from mheon/6983_bugfix

Fix Panic with -t and -a stderr
Upstream-commit: 5948b105e7dcc7428e9525ccb44d543169b47a6e
Component: engine
This commit is contained in:
Victor Vieux
2014-07-17 18:41:24 -07:00
2 changed files with 49 additions and 1 deletions

View File

@ -88,7 +88,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
}()
// When TTY is ON, use regular copy
if setRawTerminal {
if setRawTerminal && stdout != nil {
_, err = io.Copy(stdout, br)
} else {
_, err = utils.StdCopy(stdout, stderr, br)