Skip to content

Commit 5d73abb

Browse files
committed
Ensure data directory always exists
1 parent ba4a62c commit 5d73abb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
0.20.3
2+
======
3+
4+
* Ensure relenv data directory always exists
5+
6+
17
0.20.2
28
======
39

relenv/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import time
1919

2020
# relenv package version
21-
__version__ = "0.20.2"
21+
__version__ = "0.20.3"
2222

2323
MODULE_DIR = pathlib.Path(__file__).resolve().parent
2424

@@ -227,6 +227,7 @@ def get_toolchain(arch=None, root=None):
227227
:return: The directory holding the toolchain
228228
:rtype: ``pathlib.Path``
229229
"""
230+
os.makedirs(DATA_DIR, exist_ok=True)
230231
if sys.platform != "linux":
231232
return DATA_DIR
232233

@@ -243,7 +244,6 @@ def get_toolchain(arch=None, root=None):
243244
pass
244245

245246
if ppbt:
246-
DATA_DIR.mkdir(exist_ok=True)
247247
TOOLCHAIN_ROOT.mkdir(exist_ok=True)
248248
ppbt.common.extract_archive(str(TOOLCHAIN_ROOT), str(ppbt.common.ARCHIVE))
249249
return TOOLCHAIN_PATH

0 commit comments

Comments
 (0)