Browse Source

Force an exit if authentication failed!

Godzil 5 years ago
parent
commit
987e424324
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/my_request.ts

+ 2 - 1
src/my_request.ts

@@ -187,7 +187,8 @@ function authenticate(config: IConfig, done: (err: Error) => void)
       if (isAuthenticated === false)
       {
         const error = $('ul.message, li.error').text();
-        return done(new Error('Authentication failed: ' + error));
+        log.error('Authentication failed: ' + error);
+        process.exit(-1);
       }
 
       if (isPremium === false)