-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: allow overriding npm_ env vars via env #222
Conversation
c54cc18
to
8f5627d
Compare
prevents runtime error in environments where `require.resolve` is not available Fall back to any existing `npm_config_node_gyp` provided by environment
8f5627d
to
3a4d7e4
Compare
Thanks for your patience on this one. The reason it has sat like this is because This will mean finding the edges where we are still allowing for invalid configs, and formalize them in some way. |
Here's step one: npm/cli#2839 We will want to tweak this PR so that it is now looking for an actual We will always want to set the environment variable based on either |
|
This allows for a `nodeGyp` option to be passed in to define where the node-gyp bin is to run. It also allows for the environment variable `npm_config_node_gyp` to already be set, and not override it if it is. This is an extension of #222 Closes: npm/cli#2839 Co-author: @legobeat --------- Co-authored-by: legobt <[email protected]>
Allow user to override the following env vars via
env
params:npm_package_json
npm_lifecycle_event
npm_lifecycle_script
Package defaults still take precedence over
process.env
.Precendence order before:
env
paramprocess.env
Precendence order after:
env
paramprocess.env
Related
npm_config_node_gyp
environment variable andnpm config set node-gyp
config don't work with npm 7 #23node-gyp
" not respected in npm 7 cli#2839