summary refs log tree commit diff stats
path: root/compiler/options.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/options.nim')
-rw-r--r--compiler/options.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/options.nim b/compiler/options.nim
index be9342085..44519ea22 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -482,7 +482,7 @@ include packagehandling
 
 proc getOsCacheDir(): string =
   when defined(posix):
-    result = getHomeDir() / ".cache"
+    result = string getEnv("XDG_CACHE_HOME", getHomeDir() / ".cache")
   else:
     result = getHomeDir() / genSubDir