Environment variable type coercion fix (#9074)

* Environment variable type coercion fix

* Update .gitignore
This commit is contained in:
Rory Powell 2022-12-16 13:16:37 +00:00 committed by GitHub
parent 0055a08586
commit 8b01297973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ builder/*
packages/server/runtime_apps/ packages/server/runtime_apps/
.idea/ .idea/
bb-airgapped.tar.gz bb-airgapped.tar.gz
*.iml
# Logs # Logs
logs logs

View File

@ -108,12 +108,12 @@ const environment = {
} }
// threading can cause memory issues with node-ts in development // threading can cause memory issues with node-ts in development
if (isDev() && module.exports.DISABLE_THREADING == null) { if (isDev() && environment.DISABLE_THREADING == null) {
environment._set("DISABLE_THREADING", "1") environment._set("DISABLE_THREADING", "1")
} }
// clean up any environment variable edge cases // clean up any environment variable edge cases
for (let [key, value] of Object.entries(module.exports)) { for (let [key, value] of Object.entries(environment)) {
// handle the edge case of "0" to disable an environment variable // handle the edge case of "0" to disable an environment variable
if (value === "0") { if (value === "0") {
// @ts-ignore // @ts-ignore