From 2369d9d126de893f10573c001217f89428004a77 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 1 Dec 2020 15:12:09 +0100 Subject: [PATCH] =?UTF-8?q?Do=20not=20display=20help=20link=20if=20env=20v?= =?UTF-8?q?ar=20=E2=80=9CDOCKER=5FHIDE=5FHELP=5FGUIDES=E2=80=9D=20is=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guillaume Tardif --- cli/cobra.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/cobra.go b/cli/cobra.go index b1ae6b59de..d6eb3a0c33 100644 --- a/cli/cobra.go +++ b/cli/cobra.go @@ -206,7 +206,8 @@ func isExperimental(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 { @@ -365,7 +366,7 @@ Invalid Plugins: Run '{{.CommandPath}} COMMAND --help' for more information on a command. {{- end}} {{- 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}} `