From 3aaf95435965e8f7acfd955582cf85237afd2c9b Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Thu, 6 Sep 2018 02:30:53 +0300 Subject: [PATCH] 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: https://github.com/npm/npm-lifecycle/pull/25 Close: #25 Reviewed-by: @isaacs Credit: @zkochan --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e2549de..59ac9c1 100644 --- a/index.js +++ b/index.js @@ -369,7 +369,7 @@ function makeEnv (data, opts, prefix, env) { if (!env) { env = {} for (var i in process.env) { - if (!i.match(/^npm_/)) { + if (!i.match(/^npm_/) && (!i.match(/^PATH$/i) || i === PATH)) { env[i] = process.env[i] } }