From a5791be0282ade42fa84d4733943b93e73d8f03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 14 Dec 2018 17:55:51 +0000 Subject: [PATCH 1/2] Stops unplugging packages when the install scripts are disabled --- src/package-linker.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/package-linker.js b/src/package-linker.js index 66308d2221..0a8a8931a7 100644 --- a/src/package-linker.js +++ b/src/package-linker.js @@ -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; } From 180474c8e4862a31f90d106f1fd51af9a977a8b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 14 Dec 2018 18:00:20 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d38f2f349..4a5a7527a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) + ## 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.