Skip to content

Commit 57c50d8

Browse files
committed
Fixing issue with glob patterns and pure XML files
1 parent 1880719 commit 57c50d8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/application/source-code-file-reader.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,16 @@ export function processFiles(fileSystem: FileSystem) {
155155
return (rootPath: string, exclude: string[]) => {
156156
return pipe(
157157
fileSystem.getComponents(rootPath),
158-
(components) => components.filter((component) => !isExcluded(component.content!, exclude)),
158+
(components) => {
159+
return components.map((component) => {
160+
const pathLocation = component.type.name === 'ApexClass' ? component.content : component.xml;
161+
return {
162+
...component,
163+
filePath: pathLocation!,
164+
};
165+
});
166+
},
167+
(components) => components.filter((component) => !isExcluded(component.filePath, exclude)),
159168
(components) => convertersToUse.map((converter) => converter(components)),
160169
(bundles) => bundles.flat(),
161170
);

0 commit comments

Comments
 (0)