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] } }