Skip to content

Commit

Permalink
Fix help for commands with executable handler & only a short help flag
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit committed Aug 13, 2023
1 parent a253ec6 commit 8dd417f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,9 +1101,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
}

// Fallback to parsing the help flag to invoke the help.
if (this._helpLongFlag) {
return this._dispatchSubcommand(subcommandName, [], [this._helpLongFlag]);
}
return this._dispatchSubcommand(subcommandName, [], [
this._helpLongFlag || this._helpShortFlag
]);
}

/**
Expand Down

0 comments on commit 8dd417f

Please sign in to comment.