-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stops unplugging packages when the install scripts are disabled #6820
Conversation
Hi! Trying with Yarn 1.13.0 (which includes this change) this works when using Is this expected? |
Nope, not expected 😮 Can you try adding |
Using In all cases (CLI flag and both forms of the ...but I'm presuming that's because the option is retrieved via flags instead? yarn/src/cli/commands/install.js Lines 688 to 689 in fcf6298
|
Well, Lines 399 to 400 in eb2b565
Versus here (which also accepts the no-cli rc defintition): Lines 310 to 312 in eb2b565
|
It does affect whether the scripts are run, see:
|
I've broken out the issue above to #6893. |
## 1.13.0 - Implements a new `package.json` field: `peerDependenciesMeta` [6671](yarnpkg/yarn#6671) - [**Maël Nison**](https://twitter.com/arcanis) - Adds an `optional` settings to `peerDependenciesMeta` to silence missing peer dependency warnings [6671](yarnpkg/yarn#6671) - [**Maël Nison**](https://twitter.com/arcanis) - Implements `yarn policies set-version [range]`. Check [the documentation]() for usage & tips. [6673](yarnpkg/yarn#6673) - [**Maël Nison**](https://twitter.com/arcanis) - Fixes a resolution issue when a package had an invalid `main` entry [6682](yarnpkg/yarn#6682) - [**Maël Nison**](https://twitter.com/arcanis) - Decreases the size of the generated `$PATH` environment variable for a better Windows support [6683](yarnpkg/yarn#6683) - [**Rowan Lonsdale**](https://github.com/hWorblehat) - Fixes postinstall scripts for third-party packages when they were referencing a binary from their own dependencies [6712](yarnpkg/yarn#6712) - [**Maël Nison**](https://twitter.com/arcanis) - Fixes yarn audit exit code overflow [6748](yarnpkg/yarn#6748) - [**Andrey Vetlugin**](https://github.com/antrew) - Stops automatically unplugging packages with postinstall script when running under `--ignore-scripts` [6820](yarnpkg/yarn#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](yarnpkg/yarn#6816) - [**Maël Nison**](https://twitter.com/arcanis) - Properly reports the error codes when the npm registry throws 500's [6817](yarnpkg/yarn#6817) - [**Maël Nison**](https://twitter.com/arcanis)
Summary
We currently unplug packages by default when they have postinstall scripts, since we can't run them from within the cache. This approach is fine, but we're a bit overzealous and we also do this when the user explicitly disabled the scripts.
This diff ensures that we don't automatically unplug packages anymore when the install scripts are disabled. Of note: packages that have already been unplugged won't be affected by this change (so for example, if you do
yarn install && yarn install --ignore-scripts
, the packages will still be unplugged).Test plan
Should be simple enough not to be worth a test?