From adb259a5a40f08caef1b2211018cc1f5e7e11985 Mon Sep 17 00:00:00 2001 From: farfromrefuge Date: Thu, 30 Nov 2023 16:44:16 +0100 Subject: [PATCH] [jsparser]: report webpack failure If there was an error during webpack build (like output being wrong) then jsparser was returning without error causing the next build step to fail without real explanation --- test-app/build-tools/jsparser/js_parser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test-app/build-tools/jsparser/js_parser.js b/test-app/build-tools/jsparser/js_parser.js index 3b65fa3c2..9cac6fbf5 100644 --- a/test-app/build-tools/jsparser/js_parser.js +++ b/test-app/build-tools/jsparser/js_parser.js @@ -194,6 +194,9 @@ function traverseAndAnalyseFilesDir(inputDir, err) { } function traverseFiles(filesToTraverse) { + if (filesToTraverse.length === 0) { + throw "no file was found in " + inputDir + ". Something must be wrong with the webpack build"; + } for (let i = 0; i < filesToTraverse.length; i += 1) { const fp = filesToTraverse[i]; logger.info("Visiting JavaScript file: " + fp);