6
6
*/
7
7
import * as fs from 'fs' ;
8
8
import * as path from 'path' ;
9
- import { Org , SfdxError , Messages } from '@salesforce/core' ;
9
+ import { Org , SfError , Messages } from '@salesforce/core' ;
10
10
11
11
Messages . importMessagesDirectory ( __dirname ) ;
12
12
const messages = Messages . load ( '@salesforce/source-tracking' , 'compatibility' , [
@@ -69,8 +69,8 @@ export const throwIfInvalid = ({
69
69
70
70
// We expected it to be the toolbelt version but it is using the new tracking files
71
71
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 (
74
74
`${ messages . getMessage ( 'sourceTrackingFileVersionMismatch' , [ 'new/beta' ] ) } \n\nTry this:\n${ messages . getMessage (
75
75
'useOtherVersion' ,
76
76
[ 'new/beta' , replaceRenamedCommands ( command . replace ( ':legacy' , '' ) ) ]
@@ -84,7 +84,7 @@ export const throwIfInvalid = ({
84
84
}
85
85
// We expected it to be the plugin-source version but it is using the old tracking files
86
86
if ( toValidate === 'plugin-source' ) {
87
- throw new SfdxError (
87
+ throw new SfError (
88
88
messages . getMessage ( 'sourceTrackingFileVersionMismatch' , [ 'old/legacy' ] ) ,
89
89
'SourceTrackingFileVersionMismatch' ,
90
90
[
0 commit comments