Skip to content

Commit f7c34fb

Browse files
committed
Fixes auth check for service tokens
Currently `auth check` only works for user auth. This fixes it to work for both service tokens and user auth.
1 parent 954f41b commit f7c34fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/auth/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func CheckCmd(ch *cmdutil.Helper) *cobra.Command {
1919
RunE: func(cmd *cobra.Command, args []string) error {
2020
errorMessage := "You are not authenticated. Please run `pscale auth login` to authenticate."
2121

22-
if ch.Config.AccessToken == "" {
22+
if err := ch.Config.IsAuthenticated(); err != nil {
2323
return &cmdutil.Error{
2424
Msg: errorMessage,
2525
ExitCode: cmdutil.ActionRequestedExitCode,

0 commit comments

Comments
 (0)