Merge pull request #8813 from Budibase/env-var-fix
Environment variable type coercion fix
This commit is contained in:
commit
f881d5b37b
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue