From a972bbd9afa3a4c4c31b25eb651169318c658c5d Mon Sep 17 00:00:00 2001 From: andreaangiolillo Date: Thu, 7 Mar 2024 15:28:37 +0000 Subject: [PATCH 1/2] CLOUDP-236398: update new version message to remove full stop --- internal/cli/root/atlas/builder.go | 2 +- internal/cli/root/atlas/builder_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/root/atlas/builder.go b/internal/cli/root/atlas/builder.go index aad5b07a91..3adc47bea4 100644 --- a/internal/cli/root/atlas/builder.go +++ b/internal/cli/root/atlas/builder.go @@ -346,7 +346,7 @@ func (n *Notifier) notifyIfApplicable(isHb bool) error { if isHb { upgradeInstructions = `To upgrade, run "brew update && brew upgrade mongodb-atlas-cli".` } else { - upgradeInstructions = "To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli." + upgradeInstructions = "To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli" } newVersionTemplate := ` diff --git a/internal/cli/root/atlas/builder_test.go b/internal/cli/root/atlas/builder_test.go index 8f7839fe8e..bd14a5b33a 100644 --- a/internal/cli/root/atlas/builder_test.go +++ b/internal/cli/root/atlas/builder_test.go @@ -83,7 +83,7 @@ func TestOutputOpts_notifyIfApplicable(t *testing.T) { if tt.expectNewVersion { want = fmt.Sprintf(` A new version of atlascli is available '%v'! -To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli. +To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli To disable this alert, run "%s config set skip_update_check true". `, v, config.BinName()) From c2c6b17c928fc195c833aa5ffe93dee8e1948066 Mon Sep 17 00:00:00 2001 From: andreaangiolillo Date: Thu, 7 Mar 2024 15:39:15 +0000 Subject: [PATCH 2/2] fixes --- internal/cli/root/atlas/builder.go | 4 ++-- internal/cli/root/atlas/builder_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cli/root/atlas/builder.go b/internal/cli/root/atlas/builder.go index 3adc47bea4..7cd362337b 100644 --- a/internal/cli/root/atlas/builder.go +++ b/internal/cli/root/atlas/builder.go @@ -344,7 +344,7 @@ func (n *Notifier) notifyIfApplicable(isHb bool) error { var upgradeInstructions string if isHb { - upgradeInstructions = `To upgrade, run "brew update && brew upgrade mongodb-atlas-cli".` + upgradeInstructions = `To upgrade, run "brew update && brew upgrade mongodb-atlas-cli"` } else { upgradeInstructions = "To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli" } @@ -353,7 +353,7 @@ func (n *Notifier) notifyIfApplicable(isHb bool) error { A new version of atlascli is available '%s'! %s -To disable this alert, run "%s config set skip_update_check true". +To disable this alert, run "%s config set skip_update_check true" ` _, err = fmt.Fprintf(n.writer, newVersionTemplate, release.Version, upgradeInstructions, config.BinName()) return err diff --git a/internal/cli/root/atlas/builder_test.go b/internal/cli/root/atlas/builder_test.go index bd14a5b33a..ddf70d80b3 100644 --- a/internal/cli/root/atlas/builder_test.go +++ b/internal/cli/root/atlas/builder_test.go @@ -85,7 +85,7 @@ func TestOutputOpts_notifyIfApplicable(t *testing.T) { A new version of atlascli is available '%v'! To upgrade, see: https://dochub.mongodb.org/core/install-atlas-cli -To disable this alert, run "%s config set skip_update_check true". +To disable this alert, run "%s config set skip_update_check true" `, v, config.BinName()) }