mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
fix: 修复环境变量多个下划线不生效的bug
This commit is contained in:
@@ -13,3 +13,4 @@ typeorm:
|
||||
username: postgres
|
||||
password: root
|
||||
database: postgres
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ function parseEnv(defaultConfig: any) {
|
||||
continue;
|
||||
}
|
||||
keyName = keyName.replace('certd_', '');
|
||||
const configKey = keyName.replace('_', '.');
|
||||
const configKey = keyName.replaceAll('_', '.');
|
||||
const oldValue = _.get(defaultConfig, configKey);
|
||||
let value: any = process.env[key];
|
||||
if (typeof oldValue === 'boolean') {
|
||||
|
||||
Reference in New Issue
Block a user