mirror of https://github.com/certd/certd
fix: 修复环境变量多个下划线不生效的bug
parent
e8ed97206b
commit
7ec2218c9f
|
|
@ -13,3 +13,4 @@ typeorm:
|
||||||
username: postgres
|
username: postgres
|
||||||
password: root
|
password: root
|
||||||
database: postgres
|
database: postgres
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function parseEnv(defaultConfig: any) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
keyName = keyName.replace('certd_', '');
|
keyName = keyName.replace('certd_', '');
|
||||||
const configKey = keyName.replace('_', '.');
|
const configKey = keyName.replaceAll('_', '.');
|
||||||
const oldValue = _.get(defaultConfig, configKey);
|
const oldValue = _.get(defaultConfig, configKey);
|
||||||
let value: any = process.env[key];
|
let value: any = process.env[key];
|
||||||
if (typeof oldValue === 'boolean') {
|
if (typeof oldValue === 'boolean') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue