From 20c4b00a0cc0411eb8c81cec81e6173fb346aef8 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 25 Nov 2022 12:52:50 +0000 Subject: [PATCH] Environment variable type coercion fix --- packages/worker/src/environment.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/worker/src/environment.ts b/packages/worker/src/environment.ts index c9eabdfdb4..cfe284cb0a 100644 --- a/packages/worker/src/environment.ts +++ b/packages/worker/src/environment.ts @@ -67,7 +67,8 @@ const env = { ENCRYPTED_TEST_PUBLIC_API_KEY: process.env.ENCRYPTED_TEST_PUBLIC_API_KEY, _set(key: any, value: any) { process.env[key] = value - module.exports[key] = value + // @ts-ignore + env[key] = value }, isDev, isTest, @@ -82,7 +83,7 @@ if (!env.APPS_URL) { } // clean up any environment variable edge cases -for (let [key, value] of Object.entries(module.exports)) { +for (let [key, value] of Object.entries(env)) { // handle the edge case of "0" to disable an environment variable if (value === "0") { // @ts-ignore