Skip to content

Commit

Permalink
Make yarn not to add /usr/bin to PATH if already there
Browse files Browse the repository at this point in the history
  • Loading branch information
x-yuri committed Jul 30, 2018
1 parent 18b103c commit 2fc4fad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util/execute-lifecycle-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ export async function makeEnv(

// Include the directory that contains node so that we can guarantee that the scripts
// will always run with the exact same Node release than the one use to run Yarn
pathParts.unshift(path.dirname(process.execPath));
const execBin = path.dirname(process.execPath);
if (pathParts.indexOf(execBin) === -1) {
pathParts.unshift(execBin);
}

// Include node-gyp version that was bundled with the current Node.js version,
// if available.
Expand Down

0 comments on commit 2fc4fad

Please sign in to comment.