Skip to content

Commit

Permalink
Merge pull request #825 from salesforcecli/sm/read-only-auth-info
Browse files Browse the repository at this point in the history
refactor: not  mutate authinfo.getFields object
  • Loading branch information
mshanemc authored Oct 13, 2023
2 parents 8355a29 + 4f45118 commit bda72e2
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 bda72e2

Please sign in to comment.