This repository was archived by the owner on Apr 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,7 +100,12 @@ func authLoginHandler(cmd *cobra.Command, args []string) error {
100100 if err != nil {
101101 fmt .Println ("✗" )
102102 if strings .Contains (err .Error (), "402" ) {
103- return fmt .Errorf ("subscription required: visit %s to subscribe" , config .DashboardURL )
103+ fmt .Println ()
104+ fmt .Println ("⚠️ SUBSCRIPTION REQUIRED" )
105+ fmt .Println (" The API key is valid, but your account requires an active subscription." )
106+ fmt .Printf (" Please visit: %s\n " , config .DashboardURL )
107+ fmt .Println ()
108+ return fmt .Errorf ("subscription required" )
104109 }
105110 return fmt .Errorf ("key validation failed: %w" , err )
106111 }
Original file line number Diff line number Diff line change @@ -212,14 +212,15 @@ async function main() {
212212 const authStatus = execSync ( checkAuthCmd ) . toString ( ) ;
213213 if ( authStatus . includes ( "Status: not authenticated" ) || authStatus . includes ( "✗" ) ) {
214214 log ( "\n[uncompact] Authentication required. Starting login flow...\n" ) ;
215- try {
216- // Use 'auth login' which opens browser AND prompts for key
217- execFileSync ( destPath , [ "auth" , "login" ] , { stdio : "inherit" } ) ;
218- log ( "\n[uncompact] Login successful.\n" ) ;
219- } catch ( err ) {
220- log ( `\n[uncompact] Login process exited: ${ err . message } \n` ) ;
221- log ( "[uncompact] You can run it manually later: uncompact auth login\n" ) ;
222- }
215+ try {
216+ // Use 'auth login' which opens browser AND prompts for key
217+ execFileSync ( destPath , [ "auth" , "login" ] , { stdio : "inherit" } ) ;
218+ log ( "\n[uncompact] Login successful.\n" ) ;
219+ } catch ( err ) {
220+ // Command failed (e.g. invalid key, 402, or user cancelled)
221+ // We don't print the error message here because 'inherit' already showed it
222+ log ( "\n[uncompact] Login incomplete or failed. You can run it manually later: uncompact auth login\n" ) ;
223+ }
223224 }
224225 } catch ( e ) { }
225226 } else {
You can’t perform that action at this time.
0 commit comments