mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
Print a nicer error when failing to create cache directory (#2728)
Same as in 1d2248571d for the config
directory, when the cache directory fails to get created for whichever
reason, we currently exit gitui with a pretty undescriptive error.
Improves on #2684.
Fixes #2652.
This commit is contained in:
parent
1d2248571d
commit
180368621e
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,12 @@ fn get_app_cache_path() -> Result<PathBuf> {
|
|||
.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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue