From c392864c823439295529add54c388d2a5b0b0709 Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 25 May 2025 12:44:40 +0000 Subject: [PATCH] api/env: unquote variables if needed --- api/src/core/env.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/core/env.js b/api/src/core/env.js index b50afd1c..4e41760c 100644 --- a/api/src/core/env.js +++ b/api/src/core/env.js @@ -120,8 +120,12 @@ const reloadEnvs = async (contents) => { continue; } - const [ key, value ] = line.split(/=(.+)?/); + let [ key, value ] = line.split(/=(.+)?/); if (key) { + if (value.match(/^['"]/) && value.match(/['"]$/)) { + value = JSON.parse(value); + } + newEnvs[key] = value || ''; } }