Skip to content

Commit f7fd986

Browse files
committed
Remove NODE_ENV check
Motivation: tj#1955
1 parent 5828e16 commit f7fd986

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/command.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const { suggestSimilar } = require('./suggestSimilar');
1212

1313
// @ts-check
1414

15-
const PRODUCTION = process.env.NODE_ENV === 'production';
16-
1715
class Command extends EventEmitter {
1816
/**
1917
* Initialize a new `Command`.
@@ -940,7 +938,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
940938

941939
_parseSubroutine(async, userArgsCallback, argv, parseOptions) {
942940
const methodName = async ? 'parseAsync' : 'parse';
943-
if (!PRODUCTION && this._implicitlyCreated) {
941+
if (this._implicitlyCreated) {
944942
console.warn(`Called .${methodName}() on subcommand '${this._name}' added with .command().
945943
Call on top-level command instead`);
946944
}

0 commit comments

Comments
 (0)