Fix duplicate output on CLI help screen (#496)

* remove duplication

* add changeset

* fix formatting
This commit is contained in:
Joe Danziger
2025-05-14 07:12:15 -04:00
committed by GitHub
parent 4117f71c18
commit efce37469b
2 changed files with 12 additions and 13 deletions

View File

@@ -486,11 +486,6 @@ function registerCommands(programInstance) {
process.exit(1);
});
// Default help
programInstance.on('--help', function () {
displayHelp();
});
// parse-prd command
programInstance
.command('parse-prd')
@@ -2366,14 +2361,7 @@ function setupCLI() {
return 'unknown'; // Default fallback if package.json fails
})
.helpOption('-h, --help', 'Display help')
.addHelpCommand(false) // Disable default help command
.on('--help', () => {
displayHelp(); // Use your custom help display instead
})
.on('-h', () => {
displayHelp();
process.exit(0);
});
.addHelpCommand(false); // Disable default help command
// Modify the help option to use your custom display
programInstance.helpInformation = () => {