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:
commit
025363848b
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…
Reference in a new issue