add os.getCacheDir (#18126)

* add `os.getCacheDir`

* fixup

* address comments
This commit is contained in:
Timothee Cour
2021-05-31 13:16:33 -07:00
committed by GitHub
parent 60cbdbf37a
commit 9559350e34
3 changed files with 43 additions and 7 deletions

View File

@@ -556,6 +556,9 @@ block getTempDir:
else:
doAssert getTempDir() == "/tmp"
block: # getCacheDir
doAssert getCacheDir().dirExists
block osenv:
block delEnv:
const dummyEnvVar = "DUMMY_ENV_VAR" # This env var wouldn't be likely to exist to begin with