Quellcode durchsuchen

Merge pull request #8927 from bfirsh/dont-pass-args-to-help-when-command-doesnt-exist

Fix help text being incorrect with multiple args
Michael Crosby vor 10 Jahren
Ursprung
Commit
025363848b
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      api/client/cli.go

+ 2 - 2
api/client/cli.go

@@ -75,11 +75,11 @@ func (cli *DockerCli) Cmd(args ...string) error {
 		method, exists := cli.getMethod(args[0])
 		method, exists := cli.getMethod(args[0])
 		if !exists {
 		if !exists {
 			fmt.Println("Error: Command not found:", args[0])
 			fmt.Println("Error: Command not found:", args[0])
-			return cli.CmdHelp(args[1:]...)
+			return cli.CmdHelp()
 		}
 		}
 		return method(args[1:]...)
 		return method(args[1:]...)
 	}
 	}
-	return cli.CmdHelp(args...)
+	return cli.CmdHelp()
 }
 }
 
 
 func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet {
 func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet {