Skip to content

Commit f3ba824

Browse files
authored
fix: 'upgrade' output includes SDK when inside a project dir (#46)
1 parent 758884c commit f3ba824

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/upgrade/upgrade.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,14 @@ func checkForUpdates(clients *shared.ClientFactory, cmd *cobra.Command) error {
6969

7070
// Update notification messages are printed by the root command's persistent post-run (cmd/root.go).
7171
// So this command only needs to print a message when everything is up-to-date.
72-
if !updateNotification.HasUpdate() {
73-
cmd.Printf("%s You are using the latest Slack CLI and SDK\n", style.Styler().Green("✔").String())
72+
if updateNotification.HasUpdate() {
73+
return nil
74+
}
75+
76+
if clients.SDKConfig.Hooks.CheckUpdate.IsAvailable() {
77+
cmd.Printf("%s You are using the latest Slack CLI and SDK versions\n", style.Styler().Green("✔").String())
78+
} else {
79+
cmd.Printf("%s You are using the latest Slack CLI version\n", style.Styler().Green("✔").String())
7480
}
7581

7682
return nil

0 commit comments

Comments
 (0)