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
commit 6ee3db4825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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