From 712f1d1fc127f04f0e811e2b39b7214ca744c6df Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 16 Dec 2022 13:16:37 +0000 Subject: [PATCH] Environment variable type coercion fix (#9074) * Environment variable type coercion fix * Update .gitignore --- .gitignore | 1 + packages/server/src/environment.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e1d3e6db0e..915e2ea160 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ builder/* packages/server/runtime_apps/ .idea/ bb-airgapped.tar.gz +*.iml # Logs logs diff --git a/packages/server/src/environment.ts b/packages/server/src/environment.ts index bf5330f9b6..e900753be3 100644 --- a/packages/server/src/environment.ts +++ b/packages/server/src/environment.ts @@ -108,12 +108,12 @@ const environment = { } // 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") } // 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 if (value === "0") { // @ts-ignore