remove absolute path restraint from BAT_CACHE_PATH

This commit is contained in:
Kyle Criddle 2020-03-16 19:39:37 -06:00 committed by David Peter
parent a9a31dca7f
commit 4be5adc6f5
1 changed files with 2 additions and 4 deletions

View File

@ -33,10 +33,8 @@ impl BatProjectDirs {
pub fn get_cache_dir() -> Option<PathBuf> {
// on all OS prefer BAT_CACHE_PATH if set
let cache_dir_op = env::var_os("BAT_CACHE_PATH")
.map(PathBuf::from)
.filter(|p| p.is_absolute());
if !cache_dir_op.is_none() {
let cache_dir_op = env::var_os("BAT_CACHE_PATH").map(PathBuf::from);
if cache_dir_op.is_some() {
return cache_dir_op;
}