Skip to content

Commit

Permalink
Remove exit(1) when no files found to scan (#64)
Browse files Browse the repository at this point in the history
* fix the process exit when hanlding the loop cases

* use throw exception instead
  • Loading branch information
Janey2022 authored Oct 4, 2024
1 parent e9df9c6 commit acd18fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function run({

if (files.length === 0) {
console.error(`No files found to scan.`);
process.exit(1);
throw new Error(`No files found to scan.`);
}

let report = {};
Expand Down

0 comments on commit acd18fd

Please sign in to comment.