From 89b23978f99e0c8677a3223559c9431e129afee2 Mon Sep 17 00:00:00 2001 From: Ryan Delaney Date: Mon, 11 Sep 2023 14:47:34 -0400 Subject: [PATCH 1/2] Change 'pattern does not match any files' warning to fatal Fixes #383 --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index e749b21df..e5306e431 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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`); From f2fbdbb76c87ad5ea48a9a44f3467ca944d4c1dd Mon Sep 17 00:00:00 2001 From: Ryan Delaney Date: Mon, 11 Sep 2023 14:48:58 -0400 Subject: [PATCH 2/2] Raise a fatal error if the config file is not valid Related to #383 --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index e5306e431..b5580be54 100644 --- a/src/main.ts +++ b/src/main.ts @@ -63,7 +63,7 @@ async function run() { if (config.input_files) { const files = paths(config.input_files); if (files.length == 0) { - console.warn(`🤔 ${config.input_files} not include valid file.`); + throw new Error(`⚠️ ${config.input_files} not include valid file.`); } const currentAssets = rel.assets; const assets = await Promise.all(