Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
mAAdhaTTah opened this issue Jan 4, 2021 · 1 comment
Closed

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

mAAdhaTTah opened this issue Jan 4, 2021 · 1 comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@mAAdhaTTah
Copy link

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
@mAAdhaTTah mAAdhaTTah added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Jan 4, 2021
@ruyadorno ruyadorno removed the Needs Triage needs review for next steps label Jan 4, 2021
@wraithgar
Copy link
Member

wraithgar commented Jun 30, 2021

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants