We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5adadb0 commit 5ad815dCopy full SHA for 5ad815d
1 file changed
src/config.rs
@@ -51,9 +51,9 @@ pub(crate) fn get_config_file_path() -> Result<PathBuf, String> {
51
52
// Loads config (multiple sections, including commands) from a file.
53
pub fn load_config(path: &PathBuf) -> anyhow::Result<Config> {
54
- let config_data = std::fs::read_to_string(path).context("unable to read config file")?;
55
- let config: Config =
56
- serde_json::from_str(&config_data).context("unable to parse config file")?;
+ let config_data = std::fs::read_to_string(path)
+ .with_context(|| format!("unable to load config file located at {}", path.display()))?;
+ let config: Config = serde_json::from_str(&config_data).context("unable to parse config")?;
57
Ok(config)
58
}
59
0 commit comments