Permalink
Browse files

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

Copy `process.env` before lower-casing the keys
2 parents 011be49 + 392c602 commit 0c5774fec798e50c5749e8de6f6f77875fef2b02 @indexzero committed on GitHub Aug 25, 2016
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/nconf/stores/env.js
View
@@ -60,8 +60,9 @@ Env.prototype.loadEnv = function () {
var env = process.env;
if (this.lowerCase) {
- Object.keys(env).forEach(function (key) {
- env[key.toLowerCase()] = env[key];
+ env = {};
+ Object.keys(process.env).forEach(function (key) {
+ env[key.toLowerCase()] = process.env[key];
});
}

0 comments on commit 0c5774f

Please sign in to comment.