fix: regexp replace error

This commit is contained in:
Chareice 2022-04-27 21:02:12 +08:00
parent 8144cfdbea
commit 153eb970bd

View File

@ -22,7 +22,7 @@ module.exports = (options) => {
for (const env of Object.entries(envs)) {
const [key, value] = env;
const re = new RegExp(`${key}=\\w+`);
const re = new RegExp(`^${key}=(.+)`, 'm');
if (envContent.match(re)) {
envContent = envContent.replace(re, `${key}=${value}`);
} else {