Explorar o código

Fix issue when attaching stdin alone

Guillaume J. Charmes %!s(int64=12) %!d(string=hai) anos
pai
achega
25d1bc2c09
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      commands.go

+ 2 - 1
commands.go

@@ -1277,7 +1277,8 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 
 
 	if !config.AttachStdout && !config.AttachStderr {
 	if !config.AttachStdout && !config.AttachStderr {
 		fmt.Println(out.ID)
 		fmt.Println(out.ID)
-	} else {
+	}
+	if config.AttachStdin || config.AttachStdout || config.AttachStderr {
 		if config.Tty {
 		if config.Tty {
 			cli.monitorTtySize(out.ID)
 			cli.monitorTtySize(out.ID)
 		}
 		}