mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-31 15:06:42 +00:00 
			
		
		
		
	🔧 load extra config value from env if empty in file
This commit is contained in:
		| @@ -79,6 +79,9 @@ class BaseConfig(BaseSettings): | ||||
|  | ||||
|         if env_file_vars: | ||||
|             for env_name, env_val in env_file_vars.items(): | ||||
|                 if (env_val is None or | ||||
|                         len(env_val) == 0) and env_name in env_vars: | ||||
|                     env_val = env_vars[env_name] | ||||
|                 try: | ||||
|                     env_val = self.__config__.json_loads(env_val) | ||||
|                 except ValueError as e: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user