fix(cli): handle help flag as subcommand parameter more explicitly
- Convert help flags to undefined before passing to showCommandHelp - Improves semantic clarity when user runs 'myst config --help'
This commit is contained in:
parent
55d45adec8
commit
134d5ff8c7
1 changed files with 3 additions and 1 deletions
|
|
@ -185,7 +185,9 @@ export async function runCli(
|
||||||
|
|
||||||
// If help is requested for a specific command, show command-specific help
|
// If help is requested for a specific command, show command-specific help
|
||||||
if (wantsCommandHelp) {
|
if (wantsCommandHelp) {
|
||||||
showCommandHelp(command, cmdConf, subcommand || undefined);
|
const isHelpFlag = (arg: string) => arg === "--help" || arg === "-h";
|
||||||
|
const actualSubcommand = isHelpFlag(subcommand) ? undefined : subcommand;
|
||||||
|
showCommandHelp(command, cmdConf, actualSubcommand);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue