fix(pwsp-lib): fixed unhandled panic on missing config directory (#157)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Tarasov Aleksandr
2026-07-07 18:58:43 +03:00
committed by GitHub
co-authored by google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
parent d2993592be
commit d266a3f073
+2 -2
View File
@@ -1,7 +1,7 @@
use anyhow::Result; use anyhow::{Context, Result};
use std::path::PathBuf; use std::path::PathBuf;
pub fn get_config_path() -> Result<PathBuf> { pub fn get_config_path() -> Result<PathBuf> {
let config_path = dirs::config_dir().expect("Failed to obtain config dir"); let config_path = dirs::config_dir().context("Failed to obtain config dir")?;
Ok(config_path.join("pwsp")) Ok(config_path.join("pwsp"))
} }