Skip to content

Commit 365b262

Browse files
committed
Fix creation of baseline dir
The path concatentation does not work if the user did not specify a baselines dir since the stored self._baseline_dir will be None.
1 parent 2ef3b9f commit 365b262

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cacts/cacts.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,11 @@ def run_build(self,build):
224224
shutil.rmtree(build_dir)
225225
build_dir.mkdir()
226226

227-
baseline_dir = self._baselines_dir / build.longname
228-
baseline_data_dir = baseline_dir / "data"
227+
# If we're generating for the first time in this baseline dir, ensure that the folder exists
229228
if self._generate:
229+
baseline_dir = self._baselines_dir / build.longname
230+
baseline_data_dir = baseline_dir / "data"
231+
230232
baseline_dir.mkdir(exist_ok=True)
231233
baseline_data_dir.mkdir(exist_ok=True)
232234

0 commit comments

Comments
 (0)