diff --git a/packages/cli/src/cli-router.ts b/packages/cli/src/cli-router.ts index 7cdb03b..d00e4ea 100644 --- a/packages/cli/src/cli-router.ts +++ b/packages/cli/src/cli-router.ts @@ -185,7 +185,9 @@ export async function runCli( // If help is requested for a specific command, show command-specific help 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; }