Skip to content

Commit acd18fd

Browse files
authored
Remove exit(1) when no files found to scan (#64)
* fix the process exit when hanlding the loop cases * use throw exception instead
1 parent e9df9c6 commit acd18fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function run({
3131

3232
if (files.length === 0) {
3333
console.error(`No files found to scan.`);
34-
process.exit(1);
34+
throw new Error(`No files found to scan.`);
3535
}
3636

3737
let report = {};

0 commit comments

Comments
 (0)