mirror of https://github.com/docker/cli.git
Do not display help link if env var “DOCKER_HIDE_HELP_GUIDES” is set
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
dbd65f92c7
commit
2369d9d126
|
@ -206,7 +206,8 @@ func isExperimental(cmd *cobra.Command) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func displayHelpLink(cmd *cobra.Command) bool {
|
func displayHelpLink(cmd *cobra.Command) bool {
|
||||||
return !cmd.HasParent()
|
hideGuides := os.Getenv("DOCKER_HIDE_HELP_GUIDES") != ""
|
||||||
|
return !cmd.HasParent() && !hideGuides
|
||||||
}
|
}
|
||||||
|
|
||||||
func isPlugin(cmd *cobra.Command) bool {
|
func isPlugin(cmd *cobra.Command) bool {
|
||||||
|
@ -365,7 +366,7 @@ Invalid Plugins:
|
||||||
Run '{{.CommandPath}} COMMAND --help' for more information on a command.
|
Run '{{.CommandPath}} COMMAND --help' for more information on a command.
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- if displayHelpLink .}}
|
{{- if displayHelpLink .}}
|
||||||
To get more help with docker, check out guides at https://docs.docker.com/go/guides.md
|
To get more help with docker, check out guides at https://docs.docker.com/go/guides/
|
||||||
{{- end}}
|
{{- end}}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue