Skip to content

Commit a294b49

Browse files
committed
rf: move working directory default to parsing logic, display defaults in docs
1 parent d759124 commit a294b49

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/usage.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Command-Line Arguments
3535
.. argparse::
3636
:ref: fmriprep.cli.parser._build_parser
3737
:prog: fmriprep
38-
:nodefault:
3938
:nodefaultconst:
4039

4140

@@ -45,7 +44,6 @@ The command-line interface of the docker wrapper
4544
.. argparse::
4645
:ref: fmriprep_docker.__main__.get_parser
4746
:prog: fmriprep-docker
48-
:nodefault:
4947
:nodefaultconst:
5048

5149

fmriprep/cli/parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ def _fallback_trt(value, parser):
691691
'--work-dir',
692692
action='store',
693693
type=Path,
694-
default=Path('work').absolute(),
695694
help='Path where intermediate results should be stored',
696695
)
697696
g_other.add_argument(
@@ -785,6 +784,9 @@ def parse_args(args=None, namespace=None):
785784
config.execution.log_level = int(max(25 - 5 * opts.verbose_count, logging.DEBUG))
786785
config.from_dict(vars(opts), init=['nipype'])
787786

787+
if config.execution.work_dir is None:
788+
config.execution.work_dir = Path('work').absolute()
789+
788790
# Consistency checks
789791
force_set = set(config.workflow.force)
790792
ignore_set = set(config.workflow.ignore)

0 commit comments

Comments
 (0)