Merge pull request #402 from Random-Liu/fix-attach-tty

Reverse the wrong logic for tty.
This commit is contained in:
Lantao Liu
2017-11-06 21:16:38 -08:00
committed by GitHub

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 {