src: merge env-file and env vars of NODE_OPTIONS#49217
src: merge env-file and env vars of NODE_OPTIONS#49217anonrig wants to merge 1 commit intonodejs:mainfrom
NODE_OPTIONS#49217Conversation
|
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-warningsThen 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
.envfile. Right now, we merge them.Ref: #49148
cc @GeoffreyBooth @ljharb @tniessen @gireeshpunathil