Skip to content

Commit

Permalink
fix: use non-deprecated core command
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Feb 20, 2023
1 parent d193dd4 commit deeefa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/org/login/access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { Flags, loglevel } from '@salesforce/sf-plugins-core';
import { AuthFields, AuthInfo, Messages, sfdc, SfError, StateAggregator } from '@salesforce/core';
import { AuthFields, AuthInfo, Messages, matchesAccessToken, SfError, StateAggregator } from '@salesforce/core';
import { ensureString, getString } from '@salesforce/ts-types';
import { env } from '@salesforce/kit';
import { Interfaces } from '@oclif/core';
Expand Down Expand Up @@ -117,7 +117,7 @@ export default class LoginAccessToken extends AuthBaseCommand<AuthFields> {
private async getAccessToken(): Promise<string> {
const accessToken = env.getString('SFDX_ACCESS_TOKEN') ?? (await this.askForAccessToken());

if (!sfdc.matchesAccessToken(accessToken)) {
if (!matchesAccessToken(accessToken)) {
throw new SfError(messages.getMessage('invalidAccessTokenFormat', [ACCESS_TOKEN_FORMAT]));
}
return accessToken;
Expand Down

0 comments on commit deeefa7

Please sign in to comment.