Skip to content

Commit

Permalink
Stops unplugging packages when the install scripts are disabled (#6820)
Browse files Browse the repository at this point in the history
* Stops unplugging packages when the install scripts are disabled

* Update CHANGELOG.md
  • Loading branch information
arcanis committed Dec 14, 2018
1 parent 1cf0490 commit f3fb110
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -28,6 +28,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

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

- Stops automatically unplugging packages with postinstall script when running under `--ignore-scripts`

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

- Adds transparent support for the [`resolve`](https://github.com/browserify/resolve) package when using Plug'n'Play

[#6816](https://github.com/yarnpkg/yarn/pull/6816) - [**Maël Nison**](https://twitter.com/arcanis)
Expand Down
6 changes: 5 additions & 1 deletion src/package-linker.js
Expand Up @@ -698,7 +698,11 @@ export default class PackageLinker {
}

// If the package has a postinstall script, we also unplug it (otherwise they would run into the cache)
if (pkg.scripts && (pkg.scripts.preinstall || pkg.scripts.install || pkg.scripts.postinstall)) {
if (
!this.config.ignoreScripts &&
pkg.scripts &&
(pkg.scripts.preinstall || pkg.scripts.install || pkg.scripts.postinstall)
) {
return true;
}

Expand Down

0 comments on commit f3fb110

Please sign in to comment.