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.
This commit is contained in:
Ryan Choi 2025-08-11 08:59:44 -05:00
parent ffcb4d4bf2
commit 25e066b704
1 changed files with 0 additions and 5 deletions

View File

@ -127,11 +127,6 @@ program
path.join(inputDir, "flattened-codebase.xml"), 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 // Ensure output directory exists