-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
npm set -g foo bar
In npm < 7.20.0, this writes foo=bar
to the global npm config file (/usr/local/etc/npmrc
).
In npm >= 7.20.0, the -g
flag is not respected and foo=bar
is written to the user npm config file (~/.npmrc
).
Expected Behavior
The -g
flag should result in a modification to the global config, not the user config.
Steps To Reproduce
- Run
npm set -g foo bar
. - Run
npm get
. - Note that
foo
has been set in the user config rather than the global config.
Environment
- OS: macOS 10.15.7
- Node: 14.17.3
- npm: 7.20.0
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release