Remove the _local directory again
This commit is contained in:
		
							parent
							
								
									3d66ca2472
								
							
						
					
					
						commit
						79327d2efa
					
				
					 10 changed files with 10 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
fn main() {
 | 
			
		||||
	println!("cargo:rerun-if-changed=migrations");
 | 
			
		||||
	println!("cargo:rustc-env=DATABASE_URL=sqlite://_local/emgauwa-dev.sqlite");
 | 
			
		||||
	println!("cargo:rustc-env=DATABASE_URL=sqlite://emgauwa-dev.sqlite");
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,13 +58,9 @@ pub fn load<T>(config_name: &str, env_prefix: &str) -> Result<T, EmgauwaError>
 | 
			
		|||
where
 | 
			
		||||
	for<'de> T: serde::Deserialize<'de>,
 | 
			
		||||
{
 | 
			
		||||
	// TODO: Add switch to only include local config if in development mode
 | 
			
		||||
	let dev_file =
 | 
			
		||||
		config::File::with_name(&format!("./_local/emgauwa-{}", config_name)).required(false);
 | 
			
		||||
	let local_file = config::File::with_name(&format!("./emgauwa-{}", config_name)).required(false);
 | 
			
		||||
 | 
			
		||||
	config::Config::builder()
 | 
			
		||||
		.add_source(dev_file)
 | 
			
		||||
		.add_source(local_file)
 | 
			
		||||
		.add_source(
 | 
			
		||||
			config::Environment::with_prefix(&format!("EMGAUWA_{}", env_prefix))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue