1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

Fix help text being incorrect with multiple args
This commit is contained in:
Michael Crosby 2014-11-03 11:23:57 -08:00
commit 025363848b

View file

@ -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 {