浏览代码

Only stream logs when container is running

Silas Sewell 11 年之前
父节点
当前提交
3ddbb36a84
共有 1 个文件被更改,包括 1 次插入1 次删除
  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")
 	}