mirror of
https://github.com/sharkdp/bat
synced 2024-11-24 04:43:07 +00:00
remove absolute path restraint from BAT_CACHE_PATH
This commit is contained in:
parent
a9a31dca7f
commit
4be5adc6f5
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue