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():
31
31
32
32
deprecations = {
33
33
# parser attribute name: (replacement flag, version slated to be removed in)
34
+ 'clean_workdir' ,
35
+ (None , '26.0.0' ),
34
36
}
35
37
36
38
class DeprecatedAction (Action ):
@@ -633,10 +635,9 @@ def _str_none(val):
633
635
)
634
636
g_other .add_argument (
635
637
'--clean-workdir' ,
636
- action = 'store_true' ,
638
+ action = DeprecatedAction ,
637
639
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.' ,
640
641
)
641
642
g_other .add_argument (
642
643
'--resource-monitor' ,
@@ -857,14 +858,6 @@ def parse_args(args=None, namespace=None):
857
858
# Ensure the directory is created
858
859
config .execution .mcribs_dir .mkdir (exist_ok = True , parents = True )
859
860
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
-
868
861
# Ensure input and output folders are not the same
869
862
if output_dir == bids_dir :
870
863
parser .error (
You can’t perform that action at this time.
0 commit comments