You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's some logic there that's supposed to set the value of the new -L flag based on -g, but it appears to not be working correctly.
That PR seems to have updated all of the tests for --global to instead use --location=global, so they didn't catch this regression. Perhaps at least one test should be added back to verify that --global continues to work?
Is there an existing issue for this?
Current Behavior
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 andfoo=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
npm set -g foo bar
.npm get
.foo
has been set in the user config rather than the global config.Environment
The text was updated successfully, but these errors were encountered: