fix: include proposed data directory in create error
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 12m5s
Test / build (map[name:stable]) (push) Successful in 15m42s
Release Please / Release-plz (push) Successful in 1m9s
Release Please / Docker image (push) Successful in 5m43s

This commit is contained in:
Paul Campbell 2025-01-20 10:09:41 +00:00
parent 1694347f00
commit 92c24eafd1

View file

@ -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<ProjectDirs> {
}
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(