fix: include proposed data directory in create error
This commit is contained in:
parent
1694347f00
commit
92c24eafd1
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
//
|
//
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use color_eyre::eyre::Result;
|
use color_eyre::eyre::{Context, Result};
|
||||||
use directories::ProjectDirs;
|
use directories::ProjectDirs;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use tracing_error::ErrorLayer;
|
use tracing_error::ErrorLayer;
|
||||||
|
@ -30,7 +30,7 @@ fn project_directory() -> Option<ProjectDirs> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn initialize_logging() -> Result<()> {
|
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_path = DATA_FOLDER.join(LOG_FILE.clone());
|
||||||
let log_file = std::fs::File::create(log_path)?;
|
let log_file = std::fs::File::create(log_path)?;
|
||||||
std::env::set_var(
|
std::env::set_var(
|
||||||
|
|
Loading…
Add table
Reference in a new issue