Skip to content

Commit

Permalink
Improve comment in parseOptions()
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit committed Aug 4, 2023
1 parent 87ed7ea commit 02fde0e
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 @@ -1526,9 +1526,9 @@ Expecting one of '${allowedValues.join("', '")}'`);

// Not a recognised option by this command. Might be
// - a subcommand,
// - a command-argument,
// - the help option encountered after a subcommand,
// - or an option unknown to this command.
// - the help option encountered after a subcommand (considered unknown),
// - any other option unknown to this command,
// - or a command-argument.

const allArgsConsumedAsOptionsSoFar = operands.length === 0 && unknown.length === 0;
if (!subcommandEncountered && allArgsConsumedAsOptionsSoFar) {
Expand Down

0 comments on commit 02fde0e

Please sign in to comment.