Skip to content

Commit

Permalink
Remove NODE_ENV check
Browse files Browse the repository at this point in the history
Motivation: tj#1955
  • Loading branch information
aweebit committed Aug 11, 2023
1 parent 2d21112 commit cb8c30b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const { suggestSimilar } = require('./suggestSimilar');

// @ts-check

const PRODUCTION = process.env.NODE_ENV === 'production';

class Command extends EventEmitter {
/**
* Initialize a new `Command`.
Expand Down Expand Up @@ -806,7 +804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
*/

setOptionValueWithSource(key, value, source) {
if (!PRODUCTION && !this._asyncParsing && isThenable(value)) {
if (!this._asyncParsing && isThenable(value)) {
console.warn(`.parse() is incompatible with ${
['cli', 'env'].includes(source)
? 'async argParsers'
Expand Down Expand Up @@ -1192,7 +1190,7 @@ Use .parseAsync() instead`);
value = myParseArg(declaredArg, value, declaredArg.defaultValue);
}
}
if (!PRODUCTION && !this._asyncParsing && isThenable(value)) {
if (!this._asyncParsing && isThenable(value)) {
console.warn(`.parse() is incompatible with ${
declaredArg.parseArg ? 'async argParsers' : 'thenable argument values'
}.
Expand Down

0 comments on commit cb8c30b

Please sign in to comment.