Explorar o código

Only stream logs when container is running

Silas Sewell %!s(int64=11) %!d(string=hai) anos
pai
achega
3ddbb36a84
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      commands.go

+ 1 - 1
commands.go

@@ -1530,7 +1530,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
 	v.Set("logs", "1")
 	v.Set("stdout", "1")
 	v.Set("stderr", "1")
-	if *stream {
+	if *stream && container.State.Running {
 		v.Set("stream", "1")
 	}