Skip to content

Commit a3fa114

Browse files
CLOUDP-360661: [atlas-cli] atlas auth token prints token surrounded by quotes, remove quotes (#4333)
1 parent 7b09d35 commit a3fa114

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/cli/auth/token.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ func (opts *tokenOpts) Run() error {
4040
if accessToken == "" {
4141
return fmt.Errorf("no access token found for profile %s", opts.config.Name())
4242
}
43-
return opts.Print(accessToken)
43+
// Use fmt.Fprintln directly to output the raw token regardless of output settings.
44+
_, err := fmt.Fprintln(opts.ConfigWriter(), accessToken)
45+
return err
4446
}
4547

4648
func TokenBuilder() *cobra.Command {

0 commit comments

Comments
 (0)