From 92c24eafd1a9910a6233c3220766a17843a15962 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 20 Jan 2025 10:09:41 +0000 Subject: [PATCH] fix: include proposed data directory in create error --- crates/cli/src/tui/logging.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/tui/logging.rs b/crates/cli/src/tui/logging.rs index e985ef2..96e4a23 100644 --- a/crates/cli/src/tui/logging.rs +++ b/crates/cli/src/tui/logging.rs @@ -1,7 +1,7 @@ // use std::path::PathBuf; -use color_eyre::eyre::Result; +use color_eyre::eyre::{Context, Result}; use directories::ProjectDirs; use lazy_static::lazy_static; use tracing_error::ErrorLayer; @@ -30,7 +30,7 @@ fn project_directory() -> Option { } pub fn initialize_logging() -> Result<()> { - std::fs::create_dir_all(DATA_FOLDER.clone())?; + std::fs::create_dir_all(DATA_FOLDER.clone()).context(DATA_FOLDER.display())?; let log_path = DATA_FOLDER.join(LOG_FILE.clone()); let log_file = std::fs::File::create(log_path)?; std::env::set_var(