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

Commit 3aaf954

Browse files
zkochanisaacs
authored andcommittedJul 17, 2019
fix: set only one PATH env variable for child proc
without the revert and a new version of pnpm with rever #22. Old npm was duplicating the PATH env variables. New pnpm was not overriding all of them. Using only one PATH env variable will reduce uncertainty. PR-URL: #25 Close: #25 Reviewed-by: @isaacs Credit: @zkochan
1 parent d391b04 commit 3aaf954

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
@@ -369,7 +369,7 @@ function makeEnv (data, opts, prefix, env) {
369369
if (!env) {
370370
env = {}
371371
for (var i in process.env) {
372-
if (!i.match(/^npm_/)) {
372+
if (!i.match(/^npm_/) && (!i.match(/^PATH$/i) || i === PATH)) {
373373
env[i] = process.env[i]
374374
}
375375
}

0 commit comments

Comments
 (0)
This repository has been archived.