Skip to content

--ignore-scripts flag is being ignored by npm ci #2434

Closed

Description

@satbirbains

Current Behavior:

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:

  1. Create a package.json with postinstall:"echo running post install"
  2. Run npm install --ignore-scripts
  3. Run npm ci --ignore-scripts
  4. Post install script has been executed once but should not have executed at all.

Environment:

  • OS: Debian 10
  • Node: 15.5.0
  • npm: 7.3.0

Activity

  1. added
    Bug
    Needs Triage
    Release 7.x
    on Jan 2, 2021
  2. changed the title [-][BUG] <title>[/-] [+]--ignore-scripts flag is being ignored by npm ci[/+] on Jan 2, 2021
  3. self-assigned this
    on Jan 6, 2021
  4. removed
    Needs Triage
    on Jan 6, 2021
  5. wraithgar commented on Jan 7, 2021

    @wraithgar
    Contributor

    Fixed in v7.4.0

  6. jedahan commented on Oct 12, 2021

    @jedahan

    Has this been backported to v6 ?

  7. wraithgar commented on Oct 12, 2021

    @wraithgar
    Contributor

    This shouldn't need to? It was working in v6 according to the OP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugRelease 7.x

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions