From 4f45118edaba9a66e4111c19ccaa6bae7fa6af50 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Fri, 13 Oct 2023 08:17:16 -0500 Subject: [PATCH] refactor: not mutate authinfo.getFields object --- src/commands/org/login/sfdx-url.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/org/login/sfdx-url.ts b/src/commands/org/login/sfdx-url.ts index 003b4e9e..22d6815c 100644 --- a/src/commands/org/login/sfdx-url.ts +++ b/src/commands/org/login/sfdx-url.ts @@ -90,9 +90,8 @@ export default class LoginSfdxUrl extends AuthBaseCommand { setDefaultDevHub: flags['set-default-dev-hub'], }); - const result = authInfo.getFields(true); // ensure the clientSecret field... even if it is empty - result.clientSecret = result.clientSecret ?? ''; + const result = { clientSecret: '', ...authInfo.getFields(true) }; await AuthInfo.identifyPossibleScratchOrgs(result, authInfo); const successMsg = commonMessages.getMessage('authorizeCommandSuccess', [result.username, result.orgId]);