Skip to content

Commit

Permalink
Revert "Throw error on options-as-properties config after setting opt…
Browse files Browse the repository at this point in the history
…ion values"

This reverts commit ff0fd9e.
  • Loading branch information
shadowspawn authored Oct 7, 2023
1 parent 1fc5d3f commit a3a9038
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
*/

storeOptionsAsProperties(storeAsProperties = true) {
this._storeOptionsAsProperties = !!storeAsProperties;
if (this.options.length) {
throw new Error('call .storeOptionsAsProperties() before adding options');
}
if (Object.keys(this._optionValues).length) {
throw new Error('call .storeOptionsAsProperties() before setting option values');
}
this._storeOptionsAsProperties = !!storeAsProperties;
return this;
}

Expand Down

0 comments on commit a3a9038

Please sign in to comment.