-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(uninstall): use correct local prefix #2930
Merged
ruyadorno
merged 1 commit into
npm:release-next
from
jameschensmith:jameschensmith/fix/non-global-uninstalls
Mar 24, 2021
Merged
fix(uninstall): use correct local prefix #2930
ruyadorno
merged 1 commit into
npm:release-next
from
jameschensmith:jameschensmith/fix/non-global-uninstalls
Mar 24, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruyadorno
reviewed
Mar 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this looks great! ❤️
can you please also add a npm.localPrefix = ''
declaration in L24 along with the other resets? that will avoid carrying the path of a fixture to an unintended test in the future.
Done 🙂 Thanks for spotting that! |
Corrects non-global prefix path by using this.npm.localPrefix. A location already used throughout the repository. Later, this will be taken from the unified config library. Signed-off-by: James Chen-Smith <jameschensmith@gmail.com> PR-URL: #2930 Credit: @jameschensmith Close: #2930 Reviewed-by: @ruyadorno
Merged
This was referenced Nov 30, 2023
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
A commit was made in v7.7.0, which removed references to
flatOptions
in favor of a more unified config. This caused a bug wherethis.npm.config.get('prefix')
was using the global prefix.This request corrects the non-global prefix path by using
this.npm.localPrefix
, a location already used throughout the repository (in the same file, inlib/prefix.js
, etc.). Later, this value can be taken from the unified config library.References
Fixes #2927.