mirror of
https://github.com/docker/cli.git
synced 2026-09-24 15:30:10 -05:00
Bugfix: only use io.Copy in hijack if attaching both stdout and stderr
Add regression tests to ensure issue is fixed. Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon) Upstream-commit: 1476f295aca20e1c35383c133219d54a5373183f Component: engine
This commit is contained in:
committed by
Matthew Heon
parent
bcb367a385
commit
e650e69f7d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user