From bd1f348e82d01015bed7cd13599b0c22478756fc Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 7 Sep 2023 08:59:12 +0800 Subject: [PATCH] fix(dotenv): fix parse value with multiple `=` Closes: #1224 Signed-off-by: Tianling Shen --- src/dotenv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotenv.js b/src/dotenv.js index cf3d4d3863..b55aabd86e 100644 --- a/src/dotenv.js +++ b/src/dotenv.js @@ -24,7 +24,7 @@ async function parseDotenv(filePath) { for await (const line of rl) { if (line.startsWith('#')) continue; - const [key, value] = line.split('=', 2); + const [key, value] = line.split(/=(.+)/, 2); env[key.trimEnd()] = value.trimStart(); }