Skip to content

Commit 5ad815d

Browse files
committed
chore: update config error message
1 parent 5adadb0 commit 5ad815d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ pub(crate) fn get_config_file_path() -> Result<PathBuf, String> {
5151

5252
// Loads config (multiple sections, including commands) from a file.
5353
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")?;
54+
let config_data = std::fs::read_to_string(path)
55+
.with_context(|| format!("unable to load config file located at {}", path.display()))?;
56+
let config: Config = serde_json::from_str(&config_data).context("unable to parse config")?;
5757
Ok(config)
5858
}
5959

0 commit comments

Comments
 (0)