Selaa lähdekoodia

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 10 vuotta sitten
vanhempi
commit
025363848b
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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])
 		if !exists {
 			fmt.Println("Error: Command not found:", args[0])
-			return cli.CmdHelp(args[1:]...)
+			return cli.CmdHelp()
 		}
 		return method(args[1:]...)
 	}
-	return cli.CmdHelp(args...)
+	return cli.CmdHelp()
 }
 
 func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet {