Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

fix: properly remove environment variable #173

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Conversation

addaleax
Copy link
Contributor

@addaleax addaleax commented Sep 7, 2020

process.env.FOO = undefined sets the env var to 'undefined'
as a string, but removing it entirely was almost certainly the
intent here.

Using delete here resolves that and stops Node.js from warning
about it when --pending-deprecation is enabled.

Refs: https://nodejs.org/api/deprecations.html#DEP0104

`process.env.FOO = undefined` sets the env var to `'undefined'`
as a string, but removing it entirely was almost certainly the
intent here.

Using `delete` here resolves that and stops Node.js from warning
about it when `--pending-deprecation` is enabled.

Refs: https://nodejs.org/api/deprecations.html#DEP0104
@addaleax addaleax merged commit 173c0da into master Sep 21, 2020
@addaleax addaleax deleted the process-env-string branch September 21, 2020 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant