Don't intercept npm commands with prefix flag#1171
Merged
charlespierce merged 2 commits intovolta-cli:mainfrom Feb 28, 2022
Merged
Don't intercept npm commands with prefix flag#1171charlespierce merged 2 commits intovolta-cli:mainfrom
charlespierce merged 2 commits intovolta-cli:mainfrom
Conversation
mikrostew
approved these changes
Feb 26, 2022
chriskrycho
reviewed
Feb 26, 2022
Contributor
chriskrycho
left a comment
There was a problem hiding this comment.
One thought here: should we give (at least in "verbose" mode) some feedback about this? It seems like it'd be handy to let users know that they are doing something which circumvents our normal handling, and what (if any) consequences there might be.
Contributor
Author
|
Good call! Added a verbose-mode message when we detect a global that we aren't going to intercept. I think for non-verbose mode it makes sense to omit the message, since we actually provide messages on the other side, when we meaningfully change the install process, so a message that we aren't changing things seems overly intrusive. But for verbose mode it could be useful for debugging. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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.
Closes #1166
Info
npm install --global(and other global npm commands) relies on us setting theprefixconfiguration via an environment variable.--prefix, that will override our environment variable.Changes
has_global_flaghelper tohas_global_without_prefixto check for both the presence of--globaland the absence of--prefixTested