Skip to content

Commit

Permalink
Unclutter error message in broken passThrough checks
Browse files Browse the repository at this point in the history
Co-authored-by: John Gee <john@ruru.gen.nz>
  • Loading branch information
2 people authored and abetomo committed Aug 5, 2023
1 parent c60ce9d commit ec1942d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ Expecting one of '${allowedValues.join("', '")}'`);

_checkForBrokenPassThrough(command, parent) {
if (parent && command._passThroughOptions && !parent._enablePositionalOptions) {
throw new Error(`passThroughOptions cannot be used for '${command._name}' without turning on enablePositionalOptions for parent command${parent._name ? ` '${parent._name}'` : ''}`);
throw new Error(`passThroughOptions cannot be used for '${command._name}' without turning on enablePositionalOptions for parent command(s)`);
}
}

Expand Down

0 comments on commit ec1942d

Please sign in to comment.