You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--ignore-scripts flag is being ignored by npm ci #2434
npm ci is not respecting the '--ignore-scripts' flag. The postintsall script is being executed regardless.
Expected Behavior:
I would expect 'npm ci --ignore-scripts' to behave in the same way as 'npm install --no-scripts' and not run any scripts. The two commands worked in the same way in 6.14.9 but no longer after updating to 7.3.0.
Steps To Reproduce:
Create a package.json with postinstall:"echo running post install"
Run npm install --ignore-scripts
Run npm ci --ignore-scripts
Post install script has been executed once but should not have executed at all.
Activity
[-][BUG] <title>[/-][+]--ignore-scripts flag is being ignored by npm ci[/+]wraithgar commentedon Jan 6, 2021
The cli/ci.js file is missing the same constraints that cli/install.js has, cf:
https://github.com/npm/cli/blob/latest/lib/ci.js#L41
and
https://github.com/npm/cli/blob/latest/lib/install.js#L42
wraithgar commentedon Jan 7, 2021
Fixed in
v7.4.0jedahan commentedon Oct 12, 2021
Has this been backported to v6 ?
wraithgar commentedon Oct 12, 2021
This shouldn't need to? It was working in v6 according to the OP