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

fix: set only one PATH env variable for child proc #25

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
Expand Down