mirror of https://github.com/docker/cli.git
Hide experimental builtin commands in help output on unknown flag.
Previously `docker --badopt` would always include experimental commands even if experimental was not enabled. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
d57175aa2e
commit
79a75da0fd
|
@ -79,6 +79,9 @@ func setFlagErrorFunc(dockerCli *command.DockerCli, cmd *cobra.Command) {
|
||||||
if err := isSupported(cmd, dockerCli); err != nil {
|
if err := isSupported(cmd, dockerCli); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := hideUnsupportedFeatures(cmd, dockerCli); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
return flagErrorFunc(cmd, err)
|
return flagErrorFunc(cmd, err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue