From 24bc06daf8b34cd4b54147808611bf09f9ac5a0b Mon Sep 17 00:00:00 2001 From: ghassmo Date: Fri, 7 Jan 2022 19:07:13 +0400 Subject: [PATCH] cli: print the path when there is an error parsing the config file --- src/cli/cli_config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/cli_config.rs b/src/cli/cli_config.rs index 186bbbcf0..3fcbb73be 100644 --- a/src/cli/cli_config.rs +++ b/src/cli/cli_config.rs @@ -34,7 +34,12 @@ impl Config { let config: T = toml::from_str(str_buff)?; Ok(config) } else { - println!("Could not parse configuration"); + let path = path.to_str(); + if path.is_some() { + println!("Could not find/parse configuration file in: {}", path.unwrap()); + } else { + println!("Could not find/parse configuration file"); + } println!("Please follow the instructions in the README"); Err(Error::ConfigNotFound) }