-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
src: merge env-file and env vars of NODE_OPTIONS
#49217
Conversation
Review requested:
|
e797a45
to
9bf23ad
Compare
I am a little confused. Wasn't the opinion in #49148 that merging would be confusing and inconsistent with how the implementation treats other environment variables? Or does merging refer to something else here? |
Referring to @targos's comment on the original PR (https://github.com/nodejs/node/pull/48890/files#r1294239790), it sort of makes sense to me to have an edge case for |
I think the primary reason this can't work out well is that if one of the sources has |
I think it’s too confusing to special-case I think the “proper” way to support merging is to support some kind of substitution syntax in the file, like NODE_OPTIONS=${NODE_OPTIONS} --no-warnings Then the user can explicitly control the merging, for any variable, and define how it’s done (is the file’s value prepended or appended, etc.). |
I'm convinced by your arguments. I've added |
Follow-up for #49148. Prior to this change, we were preferring the environment variables over
.env
file. Right now, we merge them.Ref: #49148
cc @GeoffreyBooth @ljharb @tniessen @gireeshpunathil