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: 6 additions & 4 deletions src/cmd/cli/command/whoami.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ var whoamiCmd = &cobra.Command{

token := client.GetExistingToken(global.Cluster)

userInfo, err := auth.FetchUserInfo(ctx, token)
if err != nil {
// Either the auth service is down, or we're using a Fabric JWT: skip workspace information
if global.HasTty {
var userInfo *auth.UserInfo
// Skip userinfo fetch in non-interactive mode (CI environments)
if global.HasTty {
userInfo, err = auth.FetchUserInfo(ctx, token)
if err != nil {
// Either the auth service is down, or we're using a Fabric JWT: skip workspace information
term.Warn("Workspace information unavailable:", err)
}
}
Expand Down