Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[BUG] Single -- separator fails to pass arguments to npm script in version 10.9.0 #7880

Closed
2 tasks done
leebailey88 opened this issue Oct 27, 2024 · 2 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing Duplicate duplicate of another, existing issue

Comments

@leebailey88
Copy link

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

Instead of executing the mtm script with the specified arguments, npm outputs the current version (10.9.0) and exits.

Workaround

npm run mtm -- -- -l 1 -s 0 -h 160000 -f vix/vix-ta-macro-advanced --vix --bci --seasonal --cpi --effr --bond10 --bond2 --aaii --m2 --cape --fileToSheetName -v

Expected Behavior

Running the following command should execute the mtm script in package.json with the provided arguments:

npm run mtm -- -l 1 -s 0 -h 160000 -f vix/vix-ta-macro-advanced --vix --bci --seasonal --cpi --effr --bond10 --bond2 --aaii --m2 --cape --fileToSheetName -v```

### Steps To Reproduce

### Steps to Reproduce
1. Create an `mtm` script in `package.json`:
   ```json
   {
     "scripts": {
       "mtm": "node path/to/your-script.js"
     }
   }
  1. Run the command with arguments after a single -- separator:
    npm run mtm -- -l 1 -s 0 -h 160000 -f vix/vix-ta-macro-advanced --vix --bci --seasonal --cpi --effr --bond10 --bond2 --aaii --m2 --cape --fileToSheetName -v
  2. Observe that npm prints its version instead of executing the script with the arguments.

Additional Notes

This behavior change only started after upgrading to npm 10.9.0; the command worked correctly on 10.8.0. This change may be a bug or a new feature, but it’s currently undocumented.

Environment

Environment

  • npm version: 10.9.0
  • Node.js version: 20.11.0
  • Operating system: Windows 11
@leebailey88 leebailey88 added Bug thing that needs fixing Needs Triage needs review for next steps labels Oct 27, 2024
@milaninfy
Copy link
Contributor

Are you running in powershell? --- is also valid as far as i know. This is powershell behaviour.

@milaninfy milaninfy added Duplicate duplicate of another, existing issue and removed Needs Triage needs review for next steps labels Oct 29, 2024
@milaninfy
Copy link
Contributor

milaninfy commented Oct 29, 2024

Closing: this looks to be similar if not a duplicate of an existing issue, 7375. If you believe your instance is unique, please provide further clarifying details.

@milaninfy milaninfy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Duplicate duplicate of another, existing issue
Projects
None yet
Development

No branches or pull requests

2 participants