cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] Powershell npm run parameters are lost

Open banli17 opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] 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

banli17 avatar Aug 29 '22 01:08 banli17

node: 16.13.0(32bit) npm: 9.2.0 nvm: 1.1.9 windows terminal: 1.18.2822.0

same question

windows terminal not working image

windows cmd ok image

jhasheng avatar Nov 18 '23 04:11 jhasheng

add quotes working

image

jhasheng avatar Nov 18 '23 05:11 jhasheng

Duplicate of https://github.com/npm/cli/issues/3136.

kleinfreund avatar Jan 25 '25 15:01 kleinfreund