Skip to content

Commit

Permalink
fix: restore missing error actions (#1020)
Browse files Browse the repository at this point in the history
* fix: restore missing error actions

* docs: include url
  • Loading branch information
mshanemc authored Jun 26, 2023
1 parent 9c90d18 commit dbbeb21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions messages/sdr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples

# error_path_not_found

%s: File or folder not found
Expand Down
5 changes: 1 addition & 4 deletions src/resolve/adapters/matchingContentSourceAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/resolve/adapters/matchingContentSourceAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit dbbeb21

Please sign in to comment.