Skip to content

Commit

Permalink
Check for existence of .bin dir in pnp dependencies before adding t…
Browse files Browse the repository at this point in the history
…o `PATH`. (#6711)

* Check PnP dep has `.bin` dir before adding to `PATH`

* Update CHANGELOG

* Update CHANGELOG.md
  • Loading branch information
hWorblehat authored and arcanis committed Nov 21, 2018
1 parent 158da6c commit 0d48610
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

[#6682](https://github.com/yarnpkg/yarn/pull/6682) - [**Maël Nison**](https://twitter.com/arcanis)

- Decreases the size of the generated `$PATH` environment variable for a better Windows support

[#6683](https://github.com/yarnpkg/yarn/issues/6683) - [**Rowan Lonsdale**](https://github.com/hWorblehat)

## 1.12.3

**Important:** This release contains a cache bump. It will cause the very first install following the upgrade to take slightly more time, especially if you don't use the [Offline Mirror](https://yarnpkg.com/blog/2016/11/24/offline-mirror/) feature. After that everything will be back to normal.
Expand Down
5 changes: 4 additions & 1 deletion src/util/execute-lifecycle-script.js
Expand Up @@ -217,7 +217,10 @@ export async function makeEnv(
continue;
}

pathParts.unshift(`${dependencyInformation.packageLocation}/.bin`);
const binFolder = `${dependencyInformation.packageLocation}/.bin`;
if (await fs.exists(binFolder)) {
pathParts.unshift(binFolder);
}
}

// Note that NODE_OPTIONS doesn't support any style of quoting its arguments at the moment
Expand Down

0 comments on commit 0d48610

Please sign in to comment.