diff --git a/src/lib.rs b/src/lib.rs index c5a2c78..a409474 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,10 @@ pub fn is_macos_or_linux() -> bool { } pub fn get_home() -> Option { - env::var("HOME").ok() + match is_macos_or_linux() { + true => env::var("HOME").ok(), + false => None, + } } pub fn get_absolute_path(path: &str) -> Option {