Skip to content

Commit c117172

Browse files
aweebitabetomo
authored andcommitted
Fix help for commands with executable handler & only a short help flag
1 parent f3431d1 commit c117172

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/command.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1101,9 +1101,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
11011101
}
11021102

11031103
// Fallback to parsing the help flag to invoke the help.
1104-
if (this._helpLongFlag) {
1105-
return this._dispatchSubcommand(subcommandName, [], [this._helpLongFlag]);
1106-
}
1104+
return this._dispatchSubcommand(subcommandName, [], [
1105+
this._helpLongFlag || this._helpShortFlag
1106+
]);
11071107
}
11081108

11091109
/**

0 commit comments

Comments
 (0)