From a1857ac619028fc6bf02e95ca0b80df85f379188 Mon Sep 17 00:00:00 2001 From: Oliver Salzburg Date: Tue, 18 Oct 2016 18:48:44 +0200 Subject: [PATCH 1/2] doc: mention case-insensitive env on windows On Windows OS, environment variables are case-insensitive and are treated likewise in NodeJS. This can be confusing and can lead to hard-to-debug problems when moving code from one environment to another. Fixes: https://github.com/nodejs/node/issues/9157 --- doc/api/process.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index dc311872fa8629..b39187dd47e616 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -708,6 +708,16 @@ console.log(process.env.TEST); // => undefined ``` +On Windows operating systems, environment variables are case-insensitive. + +Example: + +```js +process.env.TEST = 1; +console.log(process.env.test); +// => 1 +``` + ## process.emitWarning(warning[, name][, ctor])