diff --git a/CHANGELOG.md b/CHANGELOG.md index e60180cdc5..e27a1c447f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes * resolve `core.hooksPath` relative to `GIT_WORK_TREE` [[@naseschwarz](https://github.com/naseschwarz)] ([#2571](https://github.com/gitui-org/gitui/issues/2571)) * yanking commit ranges no longer generates incorrect dotted range notations, but lists each individual commit [[@naseschwarz](https://github.com/naseschwarz)] (https://github.com/gitui-org/gitui/issues/2576) +* print slightly nicer errors when failing to create a directory [[@linkmauve](https://github.com/linkmauve)] (https://github.com/gitui-org/gitui/pull/2728) ## [0.27.0] - 2024-01-14 diff --git a/src/args.rs b/src/args.rs index b03d88a806..30703af36c 100644 --- a/src/args.rs +++ b/src/args.rs @@ -159,7 +159,12 @@ fn get_app_cache_path() -> Result { .ok_or_else(|| anyhow!("failed to find os cache dir."))?; path.push("gitui"); - fs::create_dir_all(&path)?; + fs::create_dir_all(&path).with_context(|| { + format!( + "failed to create cache directory: {}", + path.display() + ) + })?; Ok(path) }