Skip to content

Commit

Permalink
fix(dotenv): fix parse value with multiple =
Browse files Browse the repository at this point in the history
Closes: #1224

Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Sep 7, 2023
1 parent 722b895 commit bd1f348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dotenv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit bd1f348

Please sign in to comment.