Skip to content

Commit

Permalink
refactor: not mutate authinfo.getFields object
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Oct 13, 2023
1 parent 8355a29 commit 4f45118
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/org/login/sfdx-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ export default class LoginSfdxUrl extends AuthBaseCommand<AuthFields> {
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]);
Expand Down

0 comments on commit 4f45118

Please sign in to comment.