Skip to content

Commit 488fbfa

Browse files
committed
feat: use v3 error/messages
1 parent 5699e59 commit 488fbfa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compatibility.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
import * as fs from 'fs';
88
import * as path from 'path';
9-
import { Org, SfdxError, Messages } from '@salesforce/core';
9+
import { Org, SfError, Messages } from '@salesforce/core';
1010

1111
Messages.importMessagesDirectory(__dirname);
1212
const messages = Messages.load('@salesforce/source-tracking', 'compatibility', [
@@ -69,8 +69,8 @@ export const throwIfInvalid = ({
6969

7070
// We expected it to be the toolbelt version but it is using the new tracking files
7171
if (toValidate === 'toolbelt') {
72-
// some of the toolbelt commands aren't using SfdxCommand and the SfdxError actions won't be automatically displayed
73-
throw new SfdxError(
72+
// some of the toolbelt commands aren't using SfdxCommand and the SfError actions won't be automatically displayed
73+
throw new SfError(
7474
`${messages.getMessage('sourceTrackingFileVersionMismatch', ['new/beta'])}\n\nTry this:\n${messages.getMessage(
7575
'useOtherVersion',
7676
['new/beta', replaceRenamedCommands(command.replace(':legacy', ''))]
@@ -84,7 +84,7 @@ export const throwIfInvalid = ({
8484
}
8585
// We expected it to be the plugin-source version but it is using the old tracking files
8686
if (toValidate === 'plugin-source') {
87-
throw new SfdxError(
87+
throw new SfError(
8888
messages.getMessage('sourceTrackingFileVersionMismatch', ['old/legacy']),
8989
'SourceTrackingFileVersionMismatch',
9090
[

0 commit comments

Comments
 (0)