File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ def _build_parser():
3131
3232 deprecations = {
3333 # parser attribute name: (replacement flag, version slated to be removed in)
34+ 'clean_workdir' ,
35+ (None , '26.0.0' ),
3436 }
3537
3638 class DeprecatedAction (Action ):
@@ -633,10 +635,9 @@ def _str_none(val):
633635 )
634636 g_other .add_argument (
635637 '--clean-workdir' ,
636- action = 'store_true' ,
638+ action = DeprecatedAction ,
637639 default = False ,
638- help = 'Clears working directory of contents. Use of this flag is not'
639- 'recommended when running concurrent processes of NiBabies.' ,
640+ help = 'Deprecated and has no effect.' ,
640641 )
641642 g_other .add_argument (
642643 '--resource-monitor' ,
@@ -857,14 +858,6 @@ def parse_args(args=None, namespace=None):
857858 # Ensure the directory is created
858859 config .execution .mcribs_dir .mkdir (exist_ok = True , parents = True )
859860
860- # Wipe out existing work_dir
861- if opts .clean_workdir and work_dir .exists ():
862- from niworkflows .utils .misc import clean_directory
863-
864- build_log .info (f'Clearing previous NiBabies working directory: { work_dir } ' )
865- if not clean_directory (work_dir ):
866- build_log .warning (f'Could not clear all contents of working directory: { work_dir } ' )
867-
868861 # Ensure input and output folders are not the same
869862 if output_dir == bids_dir :
870863 parser .error (
You can’t perform that action at this time.
0 commit comments