|
|
|
@ -381,7 +381,10 @@ async fn load_config_file(config: Config) -> Result<Config, AnyError> {
|
|
|
|
|
Some(path) => { |
|
|
|
|
debug!(?path, "loading config file"); |
|
|
|
|
let toml = tokio::fs::read_to_string(&path).await?; |
|
|
|
|
let config: Config = toml::from_str(&toml)?; |
|
|
|
|
let config: Config = match toml::from_str(&toml) { |
|
|
|
|
Ok(c) => c, |
|
|
|
|
Err(e) => panic!("\nfatal error: parsing config file at {} failed:\n\n{}\n\n", path.display(), e), |
|
|
|
|
}; |
|
|
|
|
Ok(config) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|