Uses XDG_CACHE_HOME if available (#8585)

* compiler/options: use XDG_CACHE_HOME if set

* doc/nimc: update documentation
This commit is contained in:
alaviss 2018-08-09 15:50:36 +07:00 • committed by Andreas Rumpf
commit a2c5ffba0c
2 changed files with 3 additions and 2 deletions

View file

@ -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