@@ -15,11 +15,11 @@ pub struct BatProjectDirs {
15impl BatProjectDirs {
15impl BatProjectDirs {
16 fn new() -> Option<BatProjectDirs> {
16 fn new() -> Option<BatProjectDirs> {
17 let cache_dir = BatProjectDirs::get_cache_dir()?;
17 let cache_dir = BatProjectDirs::get_cache_dir()?;
19 // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
19 // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
20 // to our system's default configuration home.
20 // to our system's default configuration home.
21− let config_dir = if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR")
22+ if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR").map(PathBuf::from) {
22− .map(PathBuf::from) {
23 config_dir_op
23 config_dir_op
25 #[cfg(target_os = "macos")]
25 #[cfg(target_os = "macos")]