Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 53e6318

Browse files
committedJul 22, 2019
fix: do not exclude /path/ from process.env copying
Previously, we were forcing only the "canonical" env.Path on windows or env.PATH on Unix. However, msysgit bash uses env.PATH instead of env.Path. The result was that either the system path wasn't loaded (so binaries like 'npm' couldn't be found in windows bash) or the local node_modules paths weren't loaded (in windows cmd.exe, depending on environment variable key order). And, since they weren't being copied to the object, the mergePath logic had no effect.
1 parent 30ffaa6 commit 53e6318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ function makeEnv (data, opts, prefix, env) {
388388
if (!env) {
389389
env = {}
390390
for (var i in process.env) {
391-
if (!i.match(/^npm_/) && (!i.match(/^PATH$/i) || i === PATH)) {
391+
if (!i.match(/^npm_/)) {
392392
env[i] = process.env[i]
393393
}
394394
}

0 commit comments

Comments
 (0)
This repository has been archived.