Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmd/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,14 @@ func checkForUpdates(clients *shared.ClientFactory, cmd *cobra.Command) error {

// Update notification messages are printed by the root command's persistent post-run (cmd/root.go).
// So this command only needs to print a message when everything is up-to-date.
if !updateNotification.HasUpdate() {
cmd.Printf("%s You are using the latest Slack CLI and SDK\n", style.Styler().Green("✔").String())
if updateNotification.HasUpdate() {
return nil
}

if clients.SDKConfig.Hooks.CheckUpdate.IsAvailable() {
cmd.Printf("%s You are using the latest Slack CLI and SDK versions\n", style.Styler().Green("✔").String())
} else {
cmd.Printf("%s You are using the latest Slack CLI version\n", style.Styler().Green("✔").String())
}

return nil
Expand Down
Loading