Skip to content

Commit 51ee68d

Browse files
committed
FIX: Ensure MCRIBS output directory exists prior to running
1 parent 1b0c88d commit 51ee68d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nibabies/cli/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,8 @@ def parse_args(args=None, namespace=None):
772772
config.execution.mcribs_dir = output_dir / "sourcedata" / "mcribs"
773773
elif output_layout == "legacy":
774774
config.execution.mcribs_dir = output_dir / "mcribs"
775+
# Ensure the directory is created
776+
config.execution.mcribs_dir.mkdir(exist_ok=True, parents=True)
775777

776778
# Wipe out existing work_dir
777779
if opts.clean_workdir and work_dir.exists():

0 commit comments

Comments
 (0)