mirror of https://github.com/certd/certd
				
				
				
			fix: 修复环境变量多个下划线不生效的bug
							parent
							
								
									e8ed97206b
								
							
						
					
					
						commit
						7ec2218c9f
					
				|  | @ -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') { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 xiaojunnuo
						xiaojunnuo