Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When i have a script definition, like test
in package.json
, when i try to execute this command with arguments, npm is interpreting as a npm cli argument.
Ex:
npm run test -- -h
Gives-me:
npm run-script
Run arbitrary package scripts
Usage:
npm run-script <command> [-- <args>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--if-present] [--ignore-scripts]
[--script-shell <script-shell>]
aliases: run, rum, urn
Run "npm help run-script" for more info
Expected Behavior
I expect that when i run npm run test -- -h
, it gives me jest help info.
Steps To Reproduce
- NodeJs v16.2, npm v7.15.0
- A simple package with Jest as dependency and a script definition:
"test": "jest"
- Run
npm run test -- -h
- Not showing jest info
Environment
- OS: Windows 10
- Node: 16.2.0
- npm: 7.15.0
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
bruxisma commentedon Jun 2, 2021
I'm also experiencing this same issue, using:
gregoryzh commentedon Jun 3, 2021
reported here too.
#3136
it's only powershell, bash or cmd works
v1d3rm3 commentedon Jun 8, 2021
I have used powershell too, so it's the problem.
wraithgar commentedon Jul 1, 2021
Closing in favor of #3136