Skip to content

Commit ef70483

Browse files
committed
bugfix
1 parent ed87d79 commit ef70483

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/commands/flow/scan.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ export default class scan extends SfdxCommand {
169169
for (const lintResultKey in lintResultsOrdered) {
170170
const lintResultFlow = lintResultsOrdered[lintResultKey];
171171
this.ux.log(`== ${c.blue(c.bold(lintResultKey))} ==`)
172-
const type = scanResults.find(res => res.flow.name === lintResultKey).flow.type;
173-
if(type){
172+
const res = scanResults.find(res => res.flow.label[0] === lintResultKey);
173+
if(res){
174+
const type = res.flow.type;
174175
this.ux.log(`${c.blue(c.italic('Flow type: ' + type))}`)
175176
}
176177
this.ux.log('');
@@ -234,8 +235,7 @@ export default class scan extends SfdxCommand {
234235
// Set status code = 1 if there are errors, that will make cli exit with code 1 when not in --json mode
235236
return { summary, status: status, results: errors };
236237
}
237-
238-
// lightning flow scanner can be customized using a local config file .flow-scanner.yml
238+
// lightning flow scanner can be customized using a local config file .flow-scanner.yml
239239
private async loadScannerOptions(forcedConfigFile: string): Promise<void> {
240240
// Read config from file
241241
const moduleName = "flow-scanner";

src/libs/FindFlows.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import {glob} from 'glob';
33
export function FindFlows(dir: string) {
44

55
const getDirectories = function (src) {
6-
return glob.sync(src + '/**/*.{flow-meta.xml,flow}');
6+
return glob.sync(src + '/**/*.{flow-meta.xml,flow}', {
7+
ignore: ['./node_modules/**']
8+
});
79
};
810
return getDirectories(dir);
911

0 commit comments

Comments
 (0)