From ac6c859ca0dff9411bbb7c0f17d2f4ca34753c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 12 Aug 2021 15:40:46 +0200 Subject: [PATCH 1/2] Print "Upgrade available" instead of "Update available" This is because we have an `upgrade` command, not `update` command. --- pkg/cmd/extension/command.go | 2 +- pkg/cmd/extension/command_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/extension/command.go b/pkg/cmd/extension/command.go index 26e7afba9..953978a74 100644 --- a/pkg/cmd/extension/command.go +++ b/pkg/cmd/extension/command.go @@ -58,7 +58,7 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command { t.AddField(repo, nil, nil) var updateAvailable string if c.UpdateAvailable() { - updateAvailable = "Update available" + updateAvailable = "Upgrade available" } t.AddField(updateAvailable, nil, cs.Green) t.EndRow() diff --git a/pkg/cmd/extension/command_test.go b/pkg/cmd/extension/command_test.go index d934e45c6..73639fac4 100644 --- a/pkg/cmd/extension/command_test.go +++ b/pkg/cmd/extension/command_test.go @@ -159,7 +159,7 @@ func TestNewCmdExtension(t *testing.T) { assert.Equal(t, 1, len(em.ListCalls())) } }, - wantStdout: "gh test\tcli/gh-test\t\ngh test2\tcli/gh-test2\tUpdate available\n", + wantStdout: "gh test\tcli/gh-test\t\ngh test2\tcli/gh-test2\tUpgrade available\n", }, } From a7fc43bc5f711943c110d638e6523bb85cd9ab51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 12 Aug 2021 15:41:17 +0200 Subject: [PATCH 2/2] Add hint about argument to `extensions remove` usage synopsis --- pkg/cmd/extension/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/extension/command.go b/pkg/cmd/extension/command.go index 953978a74..eaed4618a 100644 --- a/pkg/cmd/extension/command.go +++ b/pkg/cmd/extension/command.go @@ -126,7 +126,7 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command { return cmd }(), &cobra.Command{ - Use: "remove", + Use: "remove ", Short: "Remove an installed extension", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error {