From abe78b79de746c6445d36e5141f40b86d16b74aa Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:31:25 +0100 Subject: [PATCH] chore: `docker help` should not show plugin vendor and version Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> --- cli/cobra.go | 4 ++-- e2e/cli-plugins/help_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cobra.go b/cli/cobra.go index 627096bb3e..d07a3b218a 100644 --- a/cli/cobra.go +++ b/cli/cobra.go @@ -470,7 +470,7 @@ Common Commands: Management Commands: {{- range managementSubCommands . }} - {{rpad (decoratedName .) (add .NamePadding 1)}}{{.Short}}{{ if isPlugin .}} {{vendorAndVersion .}}{{ end}} + {{rpad (decoratedName .) (add .NamePadding 1)}}{{.Short}} {{- end}} {{- end}} @@ -479,7 +479,7 @@ Management Commands: Swarm Commands: {{- range orchestratorSubCommands . }} - {{rpad (decoratedName .) (add .NamePadding 1)}}{{.Short}}{{ if isPlugin .}} {{vendorAndVersion .}}{{ end}} + {{rpad (decoratedName .) (add .NamePadding 1)}}{{.Short}} {{- end}} {{- end}} diff --git a/e2e/cli-plugins/help_test.go b/e2e/cli-plugins/help_test.go index 2b73fde545..85db703d30 100644 --- a/e2e/cli-plugins/help_test.go +++ b/e2e/cli-plugins/help_test.go @@ -35,7 +35,7 @@ func TestGlobalHelp(t *testing.T) { for _, s := range []string{ `Management Commands:`, `\s+container\s+Manage containers`, - `\s+helloworld\*\s+A basic Hello World plugin for tests \(Docker Inc\., testing\)`, + `\s+helloworld\*\s+A basic Hello World plugin for tests`, `\s+image\s+Manage images`, `Commands:`, `\s+create\s+Create a new container`,