Fix help text being incorrect with multiple args
E.g. "docker foobar run" would have printed "Command not found: foobar" and printed the help text for "run". It should instead print the root help message for docker. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
4d4a7b81bf
commit
ef004ec03f
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue