From ec297fd75217348d81c7cee5f154d77aa7f0e42b Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 30 May 2020 11:39:07 +0100 Subject: Fix cache path resolution on wasm --- dhall/src/semantics/resolve/cache.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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, ) -> Option { @@ -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, +) -> Option { + None +} fn env_var_cache_dir( provider: impl Fn(&str) -> Result, -- cgit v1.2.3