From 756c0c35c8c15a5e1014153621e8c6208ceefae3 Mon Sep 17 00:00:00 2001 From: yuta519 Date: Thu, 19 Feb 2026 07:35:56 -0500 Subject: [PATCH] fix: skip userinfo call on CI --- src/cmd/cli/command/whoami.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cmd/cli/command/whoami.go b/src/cmd/cli/command/whoami.go index 19f49e7ee..cc223ca55 100644 --- a/src/cmd/cli/command/whoami.go +++ b/src/cmd/cli/command/whoami.go @@ -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) } }