Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1d22485

Browse files
Improve error message on config dir error (#2684)
1 parent f5893d9 commit 1d22485

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/args.rs‎

Lines changed: 7 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,12 @@ 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!(
54+
"failed to create config directory: {}",
55+
confpath.display()
56+
)
57+
})?;
5358
let theme = confpath.join(arg_theme);
5459

5560
let notify_watcher: bool =

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /