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

Commit 021770b

Browse files
chulkileeisaacs
authored andcommitted
Do not add the directory containing node executable
Adding the directory containing current node executable may lead to run different executable than original PATH. See #5876 for details
1 parent 0511261 commit 021770b

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

lib/utils/lifecycle.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
7171
, p = wd.split("node_modules")
7272
, acc = path.resolve(p.shift())
7373

74-
// first add the directory containing the `node` executable currently
75-
// running, so that any lifecycle script that invoke "node" will execute
76-
// this same one.
77-
pathArr.unshift(path.dirname(process.execPath))
78-
7974
p.forEach(function (pp) {
8075
pathArr.unshift(path.join(acc, "node_modules", ".bin"))
8176
acc = path.join(acc, "node_modules", pp)

0 commit comments

Comments
 (0)