From 371d634cf9d7bb96f76a6c02e775180787c73602 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 #22 caused a regression in pnpm when users had a version of npm 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. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4eb8325..f6d2276 100644 --- a/index.js +++ b/index.js @@ -362,7 +362,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] } }