Merge pull request #211 from vanjan/fix-env-ignore-case

Copy `process.env` before lower-casing the keys
This commit is contained in:
Charlie Robbins 2016-08-25 12:48:47 -04:00 committed by GitHub
commit 0c5774fec7

View file

@ -60,8 +60,9 @@ Env.prototype.loadEnv = function () {
var env = process.env; var env = process.env;
if (this.lowerCase) { if (this.lowerCase) {
Object.keys(env).forEach(function (key) { env = {};
env[key.toLowerCase()] = env[key]; Object.keys(process.env).forEach(function (key) {
env[key.toLowerCase()] = process.env[key];
}); });
} }