From 4594a5c79634139980dd80344da787172f94cfaa Mon Sep 17 00:00:00 2001 From: Campion Fellin Date: Mon, 14 May 2018 23:04:23 -0700 Subject: [PATCH] Fix clasp login (#165) Now it checks for local rc file before logging in. Signed-off-by: campionfellin --- index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 7d9a8bb8..70bdc30c 100755 --- a/index.ts +++ b/index.ts @@ -206,8 +206,12 @@ commander DOTFILE.RC.read().then((rc: ClaspSettings) => { console.warn(ERROR.LOGGED_IN); }).catch(async (err: string) => { - await checkIfOnline(); - authorize(options.localhost, options.ownkey); + DOTFILE.RC_LOCAL.read().then((rc: ClaspSettings) => { + console.warn(ERROR.LOGGED_IN); + }).catch(async (err: string) => { + await checkIfOnline(); + authorize(options.localhost, options.ownkey); + }); }); });