Skip to content

[BUG] Powershell npm run parameters are lost #5435

Closed
@banli17

Description

@banli17

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 print process.argv in powershell,use npm it will lose the parameter --debug,But pnpm won't

a.js

console.log(process.argv)

image

When I use pnpm run the result is correct, but with npm run I need to use --- or quotes,

Expected Behavior

No response

Steps To Reproduce

No response

Environment

  • npm: 8.18.0
  • Node.js: v16.13.1
  • powershell: 7.2.5 or 5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingplatform:windowsis Windows-specific

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions