From 59c4d675abdf50ecbfa7c53f5049f2d6722fe6fd Mon Sep 17 00:00:00 2001 From: Aumkar Date: Tue, 10 Sep 2024 08:51:14 +0530 Subject: [PATCH] PCC-1585: Fixed spinner while logging in user (#312) --- packages/cli/src/lib/addonApiHelper.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/lib/addonApiHelper.ts b/packages/cli/src/lib/addonApiHelper.ts index ad01f91f..21368711 100644 --- a/packages/cli/src/lib/addonApiHelper.ts +++ b/packages/cli/src/lib/addonApiHelper.ts @@ -49,9 +49,10 @@ class AddOnApiHelper { // If auth details not found, try user logging in if (!authDetails) { - const prevOra = ora().stopAndPersist(); + // Clears older spinner if any + ora().clear(); + await login(requiredScopes || []); - prevOra.start(); authDetails = await getLocalAuthDetails(requiredScopes); if (!authDetails) throw new UserNotLoggedIn(); }