Reverse the wrong logic for tty.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2017-11-07 02:03:44 +00:00
parent b9d4eda403
commit 75e97dd168

View File

@ -333,7 +333,7 @@ func (c *ContainerIO) Attach(opts AttachOptions) error {
}
go attachStream(stdoutKey, close)
}
if opts.Tty && opts.Stderr != nil {
if !opts.Tty && opts.Stderr != nil {
wg.Add(1)
wc, close := cioutil.NewWriteCloseInformer(opts.Stderr)
if err := c.stderr.Add(stderrKey, wc); err != nil {