mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Look for the escape sequence only in tty mode
This commit is contained in:
parent
1f70b1e15d
commit
faa8843650
1 changed files with 5 additions and 1 deletions
|
@ -255,7 +255,11 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
||||||
if container.Config.StdinOnce && !container.Config.Tty {
|
if container.Config.StdinOnce && !container.Config.Tty {
|
||||||
defer cStdin.Close()
|
defer cStdin.Close()
|
||||||
}
|
}
|
||||||
_, err := CopyEscapable(cStdin, stdin)
|
if container.Config.Tty {
|
||||||
|
_, err = CopyEscapable(cStdin, stdin)
|
||||||
|
} else {
|
||||||
|
_, err = io.Copy(cStdin, stdin)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Debugf("[error] attach stdin: %s\n", err)
|
Debugf("[error] attach stdin: %s\n", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue