This commit is contained in:
ento 2025-03-19 11:31:07 +05:30 committed by GitHub
commit 6318f23db4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -388,8 +388,12 @@ func generateToken(c *cli.Context) error {
}
tok, err := token.GetAppTokenIfExists(appInfo)
if err != nil || tok == "" {
fmt.Fprintln(os.Stderr, "Unable to find token for provided application. Please run login command to generate token.")
return err
message := "Unable to find valid token for provided application. Please run login command to generate token."
fmt.Fprintln(os.Stderr, message)
if err != nil {
return err
}
return errors.New(message)
}
if _, err := fmt.Fprint(os.Stdout, tok); err != nil {