diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e7d9252a..c0875f0442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index 7401cc10e8..8205c59c5e 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -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