Skip to content

Commit 7fd0b22

Browse files
authored
Clarify that default option values are persistent
1 parent ebf672a commit 7fd0b22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
532532
// --no-foo is special and defaults foo to true, unless a --foo option is already defined
533533
const positiveLongFlag = option.long.replace(/^--no-/, '--');
534534
if (!this._findOption(positiveLongFlag)) {
535-
this.setOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, 'default');
535+
this._setPersistentOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, 'default');
536536
}
537537
} else if (option.defaultValue !== undefined) {
538-
this.setOptionValueWithSource(name, option.defaultValue, 'default');
538+
this._setPersistentOptionValueWithSource(name, option.defaultValue, 'default');
539539
}
540540

541541
// register the option

0 commit comments

Comments
 (0)