improve error msg on config file problems

This commit is contained in:
Scott Lamb 2023-01-06 14:28:42 -06:00
parent a4bc7f5218
commit 5248ebc51f
No known key found for this signature in database

View File

@ -131,8 +131,12 @@ fn read_config(path: &Path) -> Result<ConfigFile, Error> {
}
pub fn run(args: Args) -> Result<i32, Error> {
let config = read_config(&args.config)
.with_context(|_| format!("unable to read {}", &args.config.display()))?;
let config = read_config(&args.config).with_context(|_| {
format!(
"Unable to load config file {}. See documentation in ref/config.md.",
&args.config.display()
)
})?;
let mut builder = tokio::runtime::Builder::new_multi_thread();
builder.enable_all();