diff --git a/packages/core/create-nocobase-app/src/resources/templates/env.js b/packages/core/create-nocobase-app/src/resources/templates/env.js index 70bb4fa91..9dd59a2f2 100644 --- a/packages/core/create-nocobase-app/src/resources/templates/env.js +++ b/packages/core/create-nocobase-app/src/resources/templates/env.js @@ -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 {