Skip to content

Commit d6bcc89

Browse files
committed
improve error message on config dir error
1 parent fd46b9a commit d6bcc89

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/args.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::bug_report;
2-
use anyhow::{anyhow, Result};
2+
use anyhow::{anyhow, Context, Result};
33
use asyncgit::sync::RepoPath;
44
use clap::{
55
builder::ArgPredicate, crate_authors, crate_description,
@@ -49,7 +49,9 @@ pub fn process_cmdline() -> Result<CliArgs> {
4949
.map_or_else(|| PathBuf::from("theme.ron"), PathBuf::from);
5050

5151
let confpath = get_app_config_path()?;
52-
fs::create_dir_all(&confpath)?;
52+
fs::create_dir_all(&confpath).with_context(|| {
53+
format!("failed to write config to {}", confpath.display())
54+
})?;
5355
let theme = confpath.join(arg_theme);
5456

5557
let notify_watcher: bool =

0 commit comments

Comments
 (0)