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

Commit

Permalink
fix: set only one PATH env variable for child proc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zkochan authored and isaacs committed Jul 17, 2019
1 parent d391b04 commit 3aaf954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
Expand Down

0 comments on commit 3aaf954

Please sign in to comment.