From 25e066b70446a2dac620f40497bcb2fb4f33028f Mon Sep 17 00:00:00 2001 From: Ryan Choi <4576425+rmerk@users.noreply.github.com> Date: Mon, 11 Aug 2025 08:59:44 -0500 Subject: [PATCH] Fix flattener argument parsing logic bug The flattener tool had inverted logic that would error when arguments WERE provided instead of when they weren't. This fix removes the erroneous else block that was causing the command to fail with 'Could not auto-detect a project root and no arguments were provided' even when -i/--input and -o/--output were explicitly provided. The bug was in the else clause at line 130-135 which should only execute when noPathArgs is true (i.e., no arguments provided), but was executing when arguments WERE provided due to the inverted logic. --- tools/flattener/main.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/flattener/main.js b/tools/flattener/main.js index 5076c552..a6ea4099 100644 --- a/tools/flattener/main.js +++ b/tools/flattener/main.js @@ -127,11 +127,6 @@ program path.join(inputDir, "flattened-codebase.xml"), ); } - } else { - console.error( - "Could not auto-detect a project root and no arguments were provided. Please specify -i/--input and -o/--output.", - ); - process.exit(1); } // Ensure output directory exists