Change 'pattern does not match any files' warning to fatal

Fixes #383
This commit is contained in:
Ryan Delaney 2023-09-11 14:47:34 -04:00
parent c9b46fe7aa
commit 89b23978f9
No known key found for this signature in database

View file

@ -25,7 +25,7 @@ async function run() {
if (config.input_files) {
const patterns = unmatchedPatterns(config.input_files);
patterns.forEach((pattern) =>
console.warn(`🤔 Pattern '${pattern}' does not match any files.`)
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`)
);
if (patterns.length > 0 && config.input_fail_on_unmatched_files) {
throw new Error(`⚠️ There were unmatched files`);