-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose installation context into process #2472
Comments
Could be a good first contrib for someone; determine what env variables NPM makes available during script execution, and mimic them in Yarn. oh ok, I'll do the first step... 👟 Add this script to package.json
and then run
Wow, that's a lot of stuff... |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the current behavior?
Greetings!
npm
exposes the followingprocess.env.npm_config_global
. this enables me to determine what context i am operating in during installation. i do not see such a thing present for yarn.i understand that this could invoke some fear or questioning.
"why would you ever want or need that? you're probably doing something wrong!" --say concerned citizens
there's actually a plenty valid use case. my use case is that I have a package who's objective is to modify the consumer's package
oninstall
. because this pkg ships as a dep in other packages, some of which get installed globally, i care to detect this condition and respond accordingly.Please mention your node.js, yarn and operating system version.
7.4.0
0.18.1
The text was updated successfully, but these errors were encountered: