diff --git a/messages/sdr.md b/messages/sdr.md index 1e5f92a86b..5a618a6e28 100644 --- a/messages/sdr.md +++ b/messages/sdr.md @@ -54,14 +54,16 @@ No child types found in registry for %s (reading %s at %s) Metadata xml file %s is forceignored but is required for %s. -# error_no_source_ignore +# noSourceIgnore %s metadata types require source files, but %s is forceignored. -# error_no_source_ignore.actions +# noSourceIgnore.actions - Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending “\*” to your existing .forceignore entry. +See for examples + # error_path_not_found %s: File or folder not found diff --git a/src/resolve/adapters/matchingContentSourceAdapter.ts b/src/resolve/adapters/matchingContentSourceAdapter.ts index e20d5eac12..794c7162e4 100644 --- a/src/resolve/adapters/matchingContentSourceAdapter.ts +++ b/src/resolve/adapters/matchingContentSourceAdapter.ts @@ -54,10 +54,7 @@ export class MatchingContentSourceAdapter extends BaseSourceAdapter { 'ExpectedSourceFilesError' ); } else if (this.forceIgnore.denies(sourcePath)) { - throw new SfError( - messages.getMessage('error_no_source_ignore', [this.type.name, sourcePath]), - 'UnexpectedForceIgnore' - ); + throw messages.createError('noSourceIgnore', [this.type.name, sourcePath]); } component.content = sourcePath; diff --git a/test/resolve/adapters/matchingContentSourceAdapter.test.ts b/test/resolve/adapters/matchingContentSourceAdapter.test.ts index f986d41be4..3eeb250950 100644 --- a/test/resolve/adapters/matchingContentSourceAdapter.test.ts +++ b/test/resolve/adapters/matchingContentSourceAdapter.test.ts @@ -65,7 +65,7 @@ describe('MatchingContentSourceAdapter', () => { assert.throws( () => adapter.getComponent(path), SfError, - messages.getMessage('error_no_source_ignore', [type.name, path]) + messages.createError('noSourceIgnore', [type.name, path]).message ); testUtil.restore(); });