Merge pull request #8814 from Budibase/env-var-fix-master
Environment variable type coercion fix
This commit is contained in:
commit
cfaae2c3fa
|
@ -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 New Issue