mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-24 18:36:10 +08:00
fix: 环境变量中优先级: local > fes_env
This commit is contained in:
parent
112dda34e3
commit
1a406164d5
@ -152,10 +152,10 @@ export default class Service extends EventEmitter {
|
|||||||
const basePath = join(this.cwd, '.env');
|
const basePath = join(this.cwd, '.env');
|
||||||
const localPath = `${basePath}.local`;
|
const localPath = `${basePath}.local`;
|
||||||
loadDotEnv(basePath);
|
loadDotEnv(basePath);
|
||||||
loadDotEnv(localPath);
|
|
||||||
if (process.env.FES_ENV) {
|
if (process.env.FES_ENV) {
|
||||||
loadDotEnv(`${basePath}.${process.env.FES_ENV}`);
|
loadDotEnv(`${basePath}.${process.env.FES_ENV}`);
|
||||||
}
|
}
|
||||||
|
loadDotEnv(localPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user