From 3f0768aefa24ea28df81959e9aec7c5213a2c776 Mon Sep 17 00:00:00 2001 From: Daniel Kostro Date: Wed, 30 Nov 2022 12:24:37 +0100 Subject: [PATCH] fix: exit with error code 0 when already logged in --- login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login.js b/login.js index 0f682af..39fa605 100644 --- a/login.js +++ b/login.js @@ -8,7 +8,7 @@ const keyPath = '/gcp-key.json'; const result = await execa('gcloud', ['auth', 'list']); if (!result.stderr.includes('No credentialed accounts')) { console.error('You are already logged in'); - process.exit(1); + process.exit(0); } // Verify existence of key file