Skip to content

[BUG] User-defined run script overwritten by shell command #2439

Closed
@mAAdhaTTah

Description

@mAAdhaTTah

Current Behavior:

In my pkg.json#scripts, I have a env script that runs a command. In npm@6m running npm run env runs that script. in npm@7, it seems to run the env shell command.

Expected Behavior:

pkg.json#scripts should take precedence over shell commands.

Steps To Reproduce:

  1. Run env in your shell.
  2. See output to confirm you have an env command.
  3. Add an env script to pkg.json#scripts that does something different.
  4. Run npm run env in npm@6.
  5. See env script in pkg.json run.
  6. Run npm run env in npm@7.
  7. See env shell command output.

Environment:

  • OS: OSX
  • Node: 15.5.0
  • npm: 7.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions