Skip to content

Commit 6a7f4ed

Browse files
committed
Add spinner to whoami command
1 parent 26c1053 commit 6a7f4ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cli/command/whoami/whoami.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ func runWhoami(wpmCli command.Cli) error {
6868
return errors.New("user must be logged in to perform this action")
6969
}
7070

71-
username, err := validateToken(wpmCli, cfg.AuthToken)
71+
var username string
72+
err := wpmCli.Progress().RunWithProgress("", func() error {
73+
var err error
74+
username, err = validateToken(wpmCli, cfg.AuthToken)
75+
return err
76+
}, wpmCli.Out())
77+
7278
if err != nil {
7379
return err
7480
}

0 commit comments

Comments
 (0)