From ef004ec03fe5aad33da7d53f196f16382c750d07 Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Mon, 3 Nov 2014 16:46:01 +0000 Subject: [PATCH] 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 --- api/client/cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/client/cli.go b/api/client/cli.go index 70eae6e4b4e35..74e645171a866 100644 --- a/api/client/cli.go +++ b/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 {