You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the line current(make(process.env.NODE_ENV || argv.env || "development")); if NODE_ENV is set to anything truthy it'll use that regardless of any other method (as the or is short-circuited) of setting the environment, and otherwise it'll fall to arg.env in the same way, and so forth. Make this clear in the documentation. Also, if NODE_ENV is set to "development" then not even gulp.task('set-prod', production.task); or environments.current(production); will override it
Plus, I think it should be reversed, command line should override NODE_ENV or code, and code should override NODE_ENV.
Thanks for the module!
The text was updated successfully, but these errors were encountered:
I'm adding my voice here to note that now, in 2019, I'd also like the command line argument to take priority over an environment variable.
I disagree that code should be overridden by command-line argument. I think code should probably be the strongest, personally. But in any case, it's absolutely weird that environment variable wins.
calvinjuarez
added a commit
to calvinjuarez/gulp-environments
that referenced
this issue
Oct 1, 2019
Given the line
current(make(process.env.NODE_ENV || argv.env || "development"));
if NODE_ENV is set to anything truthy it'll use that regardless of any other method (as the or is short-circuited) of setting the environment, and otherwise it'll fall to arg.env in the same way, and so forth. Make this clear in the documentation. Also, if NODE_ENV is set to "development" then not evengulp.task('set-prod', production.task);
orenvironments.current(production);
will override itPlus, I think it should be reversed, command line should override NODE_ENV or code, and code should override NODE_ENV.
Thanks for the module!
The text was updated successfully, but these errors were encountered: