Skip to content

[BUG] Npm incorrectly reads parameters in Powershell terminal (Node 20.13.0) #7487

Closed
@HannaTarasevich

Description

@HannaTarasevich

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I'm using Powershell to run scripts from package.json with added parameters that are expected to be read by Yargs:
npm run test --tag=@tc --env=DEMO
OR
npm run test --tag "@tc" --env "DEMO"
OR
npm run test -- --tag "@tc" --env "DEMO"

These parameters are processed now incorrectly, they are not taken into account, or it takes only the latest word:
image

Expected Behavior

Npm should read all the parameters sent via Powershell like Yarn now does and as Npm did previously:
image

Steps To Reproduce

  1. Run any script from package.json using random or meaningful parameters (e.g., that can be parsed by Yargs)

Environment

  • npm: 10.7.0
  • Node.js: 20.13.0
  • OS Name: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions