fix: 环境变量中优先级: local > fes_env

This commit is contained in:
万纯 2021-03-05 17:34:04 +08:00
parent 112dda34e3
commit 1a406164d5

View File

@ -152,10 +152,10 @@ export default class Service extends EventEmitter {
const basePath = join(this.cwd, '.env');
const localPath = `${basePath}.local`;
loadDotEnv(basePath);
loadDotEnv(localPath);
if (process.env.FES_ENV) {
loadDotEnv(`${basePath}.${process.env.FES_ENV}`);
}
loadDotEnv(localPath);
}
async init() {