Skip to content

Commit c2031ca

Browse files
committed
api: always run datasink and let copyfiles decide if things need to be copied or not. in case inputs are directories, this will allow refreshing outputs.
1 parent f4c5282 commit c2031ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nipype/interfaces/io.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class DataSink(IOBase):
214214
input_spec = DataSinkInputSpec
215215
output_spec = DataSinkOutputSpec
216216

217-
def __init__(self, infields=None, **kwargs):
217+
def __init__(self, infields=None, force_run=True, **kwargs):
218218
"""
219219
Parameters
220220
----------
@@ -232,6 +232,8 @@ def __init__(self, infields=None, **kwargs):
232232
self.inputs._outputs[key] = Undefined
233233
undefined_traits[key] = Undefined
234234
self.inputs.trait_set(trait_change_notify=False, **undefined_traits)
235+
if force_run:
236+
self._always_run = True
235237

236238
def _get_dst(self, src):
237239
## If path is directory with trailing os.path.sep,

0 commit comments

Comments
 (0)