Use fallback if HOME is not set.
This commit is contained in:
parent
3e370bfa52
commit
2f3705bb12
@ -70,13 +70,13 @@ def _find_system_cache_dir() -> str:
|
||||
if os.name == 'posix':
|
||||
if 'XDG_CACHE_HOME' in os.environ:
|
||||
return os.environ['XDG_CACHE_HOME']
|
||||
else:
|
||||
elif 'HOME' in os.environ:
|
||||
return os.path.join(os.environ['HOME'], '.cache')
|
||||
elif os.name == 'nt':
|
||||
# TODO: just guessing
|
||||
return os.environ['LocalAppData']
|
||||
else: # fallback
|
||||
return Dir('#cache').abspath
|
||||
# fallback
|
||||
return Dir('#cache').abspath
|
||||
|
||||
Import('config')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user