src: don't overwrite environment from .env file by philnash · Pull Request #49424 · nodejs/node

@philnash

This commit adds a check to see if an environment variable that is
found in the .env file is already set in the environment. If it is,
then the value from the .env file is not used.

@nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

needs-ci

PRs that need a full CI run.

labels

Sep 1, 2023

@anonrig anonrig added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

review wanted

PRs that need reviews.

request-ci

Add this label to start a Jenkins CI on a PR.

labels

Sep 2, 2023

anonrig

@GeoffreyBooth GeoffreyBooth added the cli

Issues and PRs related to the Node.js command line interface.

label

Sep 2, 2023

@philnash

anonrig

@philnash

In some CI environments the TZ env var is set. Since a .env file won't
override that, we need to create an env where the test can still run by
deleting the TZ variable.

atlowChemi

This was referenced

Sep 9, 2023

UlisesGascon pushed a commit that referenced this pull request

Sep 11, 2023
This commit adds a check to see if an environment variable that is
found in the .env file is already set in the environment. If it is,
then the value from the .env file is not used.

PR-URL: #49424
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>

UlisesGascon pushed a commit that referenced this pull request

Sep 11, 2023
This commit adds a check to see if an environment variable that is
found in the .env file is already set in the environment. If it is,
then the value from the .env file is not used.

PR-URL: #49424
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request

Nov 1, 2023
This commit adds a check to see if an environment variable that is
found in the .env file is already set in the environment. If it is,
then the value from the .env file is not used.

PR-URL: nodejs#49424
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>