mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #13988 from runcom/fix-old-code-path-removal
Remove missed code path for api < 1.12
This commit is contained in:
commit
af845d42a5
2 changed files with 1 additions and 3 deletions
|
@ -1124,7 +1124,6 @@ func (s *Server) postContainersAttach(version version.Version, w http.ResponseWr
|
||||||
UseStderr: boolValue(r, "stderr"),
|
UseStderr: boolValue(r, "stderr"),
|
||||||
Logs: boolValue(r, "logs"),
|
Logs: boolValue(r, "logs"),
|
||||||
Stream: boolValue(r, "stream"),
|
Stream: boolValue(r, "stream"),
|
||||||
Multiplex: version.GreaterThanOrEqualTo("1.6"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.daemon.ContainerAttachWithLogs(vars["name"], attachWithLogsConfig); err != nil {
|
if err := s.daemon.ContainerAttachWithLogs(vars["name"], attachWithLogsConfig); err != nil {
|
||||||
|
|
|
@ -11,7 +11,6 @@ type ContainerAttachWithLogsConfig struct {
|
||||||
OutStream io.Writer
|
OutStream io.Writer
|
||||||
UseStdin, UseStdout, UseStderr bool
|
UseStdin, UseStdout, UseStderr bool
|
||||||
Logs, Stream bool
|
Logs, Stream bool
|
||||||
Multiplex bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (daemon *Daemon) ContainerAttachWithLogs(name string, c *ContainerAttachWithLogsConfig) error {
|
func (daemon *Daemon) ContainerAttachWithLogs(name string, c *ContainerAttachWithLogsConfig) error {
|
||||||
|
@ -22,7 +21,7 @@ func (daemon *Daemon) ContainerAttachWithLogs(name string, c *ContainerAttachWit
|
||||||
|
|
||||||
var errStream io.Writer
|
var errStream io.Writer
|
||||||
|
|
||||||
if !container.Config.Tty && c.Multiplex {
|
if !container.Config.Tty {
|
||||||
errStream = stdcopy.NewStdWriter(c.OutStream, stdcopy.Stderr)
|
errStream = stdcopy.NewStdWriter(c.OutStream, stdcopy.Stderr)
|
||||||
c.OutStream = stdcopy.NewStdWriter(c.OutStream, stdcopy.Stdout)
|
c.OutStream = stdcopy.NewStdWriter(c.OutStream, stdcopy.Stdout)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue