-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release
Description
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
The npm fund command has a --browser flag which can be null (not provided), a boolean value, or a string.
However there are a number of things wrong with it.
npm fund --browser=openshould attempt to use the "open" command to open a browser. However the argument resolves to the valuetrueand the system default is used.npm fund --browser --helpshould parse the--helpflag but doesn't because it's treated as an argument to the--browserflag.
The end result is only boolean values can actually be input as all string values resolve to the boolean value true.
Expected Behavior
npm fund --browser=openshould attempt to use the appropriate method to open the browser.npm fund --browser --helpshould parse any flags after the--browserflag as a flag rather than an argument to the--browserflag.
Steps To Reproduce
- Run
npm fund --browser=openon a Linux system. - The system default
xdg-openis used to open the browser.
Environment
- npm: npm HEAD (60460ed)
- Node.js: v16.17.0
- OS Name: Debian Linux
- npm config: None
; "user" config from /usr/local/google/home/ianlewis/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; "project" config from /usr/local/google/home/ianlewis/opt/node-v16.17.0-linux-x64/bin/node_modules/npm/.npmrc
package-lock = true
; node bin location = /usr/local/google/home/ianlewis/opt/node-v16.17.0-linux-x64/bin/node
; node version = v16.17.0
; npm local prefix = /usr/local/google/home/ianlewis/opt/node-v16.17.0-linux-x64/bin/node_modules/npm
; npm version = 8.15.0
; cwd = /usr/local/google/home/ianlewis/opt/node-v16.17.0-linux-x64/bin/node_modules/npm
; HOME = /usr/local/google/home/ianlewis
; Run `npm config ls -l` to show all defaults.Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release