Skip to content

Commit

Permalink
Fix help text being incorrect with multiple args
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bfirsh committed Nov 3, 2014
1 parent 4d4a7b8 commit ef004ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/client/cli.go
Expand Up @@ -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 {
Expand Down

0 comments on commit ef004ec

Please sign in to comment.