浏览代码

fixed an issue with the help history command, printed twice

Ken Cochrane 12 年之前
父节点
当前提交
a9a439183d
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      commands.go

+ 4 - 1
commands.go

@@ -297,7 +297,10 @@ func (srv *Server) CmdRmi(stdin io.ReadCloser, stdout io.Writer, args ...string)
 
 func (srv *Server) CmdHistory(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
 	cmd := rcli.Subcmd(stdout, "history", "[OPTIONS] IMAGE", "Show the history of an image")
-	if cmd.Parse(args) != nil || cmd.NArg() != 1 {
+	if err := cmd.Parse(args); err != nil {
+		return nil
+	}
+	if cmd.NArg() != 1 {
 		cmd.Usage()
 		return nil
 	}