This commit is contained in:
2026-05-08 11:44:42 +08:00
parent b08127031c
commit abf1f1ebea
249 changed files with 39411 additions and 887 deletions

View File

@@ -7,6 +7,7 @@ const apiServerExePath = resolve(
repoRoot,
'server-rs/target/debug/api-server.exe',
);
const shellEnvKeys = new Set(Object.keys(process.env));
function loadEnvFile(path, target) {
if (!existsSync(path)) {
@@ -26,7 +27,9 @@ function loadEnvFile(path, target) {
}
const [, key, rawValue] = match;
if (target[key] !== undefined) {
// 只保留启动命令行和外层 shell 已显式传入的环境变量优先级;
// `.env.local` 需要能覆盖 `.env`,否则本地短信登录会被默认 false 压住。
if (shellEnvKeys.has(key)) {
continue;
}