Skip to content

Commit 7e1b40f

Browse files
committed
Make tmpdir if it does not exist
Spack will fail with a slightly complicated error message if it can not write to the tmpdir (i.e. if it does not already exist)
1 parent 739f59a commit 7e1b40f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mache/spack/env.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ def make_spack_env(
140140
with open(str(path)) as fp:
141141
template = Template(fp.read())
142142
if tmpdir is not None:
143+
if not os.path.exists(tmpdir):
144+
os.mkdir(tmpdir)
145+
143146
modules = f'{modules}\nexport TMPDIR={tmpdir}'
144147

145148
template_args = dict(

0 commit comments

Comments
 (0)