Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit committed Aug 1, 2023
1 parent 9721ae8 commit 5c87223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
* @return {Command} `this` command for chaining
*/
addOption(option) {
const matchingOption = (option.short && this._findOption(option.short))
|| (option.long && this._findOption(option.long));
const matchingOption = (option.short && this._findOption(option.short)) ||
(option.long && this._findOption(option.long));
if (matchingOption) {
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to '${this._name}'`} since an option using same flag has already been added
- conflicts with option '${matchingOption.flags}'`);
Expand Down

0 comments on commit 5c87223

Please sign in to comment.