diff options
-rw-r--r-- | dhall/src/semantics/resolve/cache.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dhall/src/semantics/resolve/cache.rs b/dhall/src/semantics/resolve/cache.rs index b725bf3..7fdd758 100644 --- a/dhall/src/semantics/resolve/cache.rs +++ b/dhall/src/semantics/resolve/cache.rs @@ -18,6 +18,7 @@ const ALTERNATE_ENV_VAR: &str = "HOME"; #[cfg(windows)] const ALTERNATE_ENV_VAR: &str = "LOCALAPPDATA"; +#[cfg(any(unix, windows))] fn alternate_env_var_cache_dir( provider: impl Fn(&str) -> Result<String, VarError>, ) -> Option<PathBuf> { @@ -26,6 +27,12 @@ fn alternate_env_var_cache_dir( .map(|env_dir| env_dir.join(".cache").join("dhall")) .ok() } +#[cfg(not(any(unix, windows)))] +fn alternate_env_var_cache_dir( + _provider: impl Fn(&str) -> Result<String, VarError>, +) -> Option<PathBuf> { + None +} fn env_var_cache_dir( provider: impl Fn(&str) -> Result<String, VarError>, |