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 57baaf1 commit 76fe4e8Copy full SHA for 76fe4e8
pioinstaller/core.py
@@ -57,12 +57,15 @@ def get_core_dir(force_to_root=False):
57
return core_dir
58
59
60
-def get_cache_dir(path=None):
61
- core_dir = path or get_core_dir()
62
- path = os.path.join(core_dir, ".cache")
63
- if not os.path.isdir(path):
64
- os.makedirs(path)
65
- return path
+def get_cache_dir():
+ cache_dir = (
+ os.getenv("PLATFORMIO_CACHE_DIR")
+ if os.getenv("PLATFORMIO_CACHE_DIR")
+ else os.path.join(get_core_dir(), ".cache")
+ )
66
+ if not os.path.isdir(cache_dir):
67
+ os.makedirs(cache_dir)
68
+ return cache_dir
69
70
71
def install_platformio_core(shutdown_piohome=True, develop=False, ignore_pythons=None):
0 commit comments