From 987e424324a389259e17ff306e1f979d11927fae Mon Sep 17 00:00:00 2001 From: Godzil Date: Sat, 14 Jul 2018 20:41:49 +0100 Subject: [PATCH] Force an exit if authentication failed! --- src/my_request.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/my_request.ts b/src/my_request.ts index ac2c6ff..58452e9 100644 --- a/src/my_request.ts +++ b/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)