Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ pub fn process_cmdline() -> Result<CliArgs> {
.map_or_else(|| PathBuf::from("theme.ron"), PathBuf::from);

let confpath = get_app_config_path()?;
fs::create_dir_all(&confpath)?;
fs::create_dir_all(&confpath).map_err(|e| {
anyhow!(
"Failed to create config directory: {}\nError: {}",
confpath.display(),
e
)
})?;
let theme = confpath.join(arg_theme);

let notify_watcher: bool =
Expand Down Expand Up @@ -154,7 +160,13 @@ 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).map_err(|e| {
anyhow!(
"Failed to create cache directory: {}\nError: {}",
path.display(),
e
)
})?;
Ok(path)
}

Expand Down