This commit is contained in:
n4n5
2024-12-30 10:11:49 +01:00
committed by andy.boot
parent eeb686562d
commit 609fc1e760

View File

@@ -258,16 +258,15 @@ pub fn get_config(conf_path: Option<String>) -> Config {
Some(path_str) => { Some(path_str) => {
let path = Path::new(&path_str); let path = Path::new(&path_str);
if path.exists() { if path.exists() {
match Config::from_config_file(&path) { match Config::from_config_file(path) {
Ok(config) => return config, Ok(config) => return config,
Err(e) => eprintln!( Err(e) => {
"Ignoring invalid config file ({}): {:?}", eprintln!("Ignoring invalid config file '{}': {}", &path.display(), e)
&path.display(), }
e
),
} }
} else {
eprintln!("Config file {:?} doesn't exists", &path.display());
} }
eprintln!("Config file {:?} doesn't exists", &path.display());
} }
None => { None => {
if let Some(home) = directories::BaseDirs::new() { if let Some(home) = directories::BaseDirs::new() {