Skip to content

Commit ac9da09

Browse files
committed
enh: add check for tpl prefix
1 parent 035ac91 commit ac9da09

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wrapper/fmriprep_docker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ def main():
428428
for space in opts.output_spaces:
429429
if space.split(':')[0] not in (TF_TEMPLATES + NONSTANDARD_REFERENCES):
430430
tpl = os.path.basename(space)
431+
if not tpl.startswith('tpl-'):
432+
raise RuntimeError("Custom template %s requires a `tpl-` prefix" % tpl)
431433
target = '/home/fmriprep/.cache/templateflow/' + tpl
432434
command.extend(['-v', ':'.join((os.path.abspath(space), target, 'ro'))])
433435
spaces.append(tpl[4:])

0 commit comments

Comments
 (0)