Skip to content

Commit cec97dc

Browse files
authored
fix: check AUTOREST_HOME directory is created if it doesn't exist
1 parent 290f7fc commit cec97dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

diracx-testing/src/diracx/testing/client_generation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ast
99
import importlib.util
1010
import json
11+
import os
1112
import shlex
1213
import subprocess
1314
import sys
@@ -165,6 +166,9 @@ def regenerate_client(openapi_spec: Path, client_module: str):
165166
f"--output-folder={client_root}",
166167
]
167168

169+
if "AUTOREST_HOME" in os.environ:
170+
os.makedirs(os.environ["AUTOREST_HOME"], exist_ok=True)
171+
168172
# ruff: disable=S603
169173
subprocess.run(cmd, check=True)
170174

0 commit comments

Comments
 (0)