Skip to content

Commit

Permalink
Improve comment on passThroughOptions
Browse files Browse the repository at this point in the history
Fixes tj#1936 partially (docs need an update, too)

(cherry picked from commit b11e940)
  • Loading branch information
aweebit committed Aug 5, 2023
1 parent d038570 commit f07ba2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
}
}

// If using passThroughOptions, stop processing options at first command-argument.
// If using passThroughOptions, stop processing options at first command-argument / unknown option.
// Processing after an unknown option is not possible because there is no way to know if the next argument is its option-argument and we should continue,
// or if it is a command-argument and we should stop.
if (this._passThroughOptions) {
dest.push(arg);
if (args.length > 0) dest.push(...args);
Expand Down

0 comments on commit f07ba2c

Please sign in to comment.