We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa74e27 commit 79b2042Copy full SHA for 79b2042
Cache/IO.lean
@@ -32,8 +32,12 @@ def IRDIR : FilePath :=
32
"build" / "ir"
33
34
/-- Target directory for caching -/
35
-def CACHEDIR : FilePath :=
36
- ⟨".cache"⟩
+initialize CACHEDIR : FilePath ← do
+ match ← IO.getEnv "XDG_CACHE_HOME" with
37
+ | some path => return path / "mathlib"
38
+ | none => match ← IO.getEnv "HOME" with
39
+ | some path => return path / ".cache" / "mathlib"
40
+ | none => pure ⟨".cache"⟩
41
42
/-- Target file path for `curl` configurations -/
43
def CURLCFG :=
0 commit comments