Skip to content

Commit 41d1f15

Browse files
committed
feat(cli): Add consistency checks after fully populating config
1 parent a3a17b1 commit 41d1f15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fmriprep/cli/parser.py

+8
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,14 @@ def parse_args(args=None, namespace=None):
800800
config.execution.log_level = int(max(25 - 5 * opts.verbose_count, logging.DEBUG))
801801
config.from_dict(vars(opts), init=['nipype'])
802802

803+
# Consistency checks
804+
if 'bbr' in config.workflow.force and 'no-bbr' in config.workflow.force:
805+
msg = (
806+
'Cannot force and disable boundary-based registration at the same time. '
807+
'Remove `bbr` or `no-bbr` from the `--force` options.'
808+
)
809+
raise ValueError(msg)
810+
803811
if not config.execution.notrack:
804812
import importlib.util
805813

0 commit comments

Comments
 (0)