fix(flattener): fix argument parsing logic to work with provided input/output paths
The flattener tool had inverted logic that would show an error message when users provided arguments (-i/--input or -o/--output) instead of using them. This fix removes the incorrect error message, allowing the tool to work correctly in both modes: - When arguments are provided: uses the specified paths - When no arguments are provided: works in interactive mode as before
This commit is contained in:
parent
9868437f10
commit
192f531d20
|
|
@ -127,12 +127,9 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
// If user provided arguments, use the resolved inputDir and outputPath from the options
|
||||||
|
// which are already set at the beginning of the function
|
||||||
|
|
||||||
// Ensure output directory exists
|
// Ensure output directory exists
|
||||||
await fs.ensureDir(path.dirname(outputPath));
|
await fs.ensureDir(path.dirname(outputPath));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue