Skip to content

Commit 4e8c27e

Browse files
authored
fix: state path and dataset for datalad get
1 parent 7997e7d commit 4e8c27e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templateflow/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,15 @@ def _datalad_get(filepath):
197197
from datalad import api
198198
from datalad.support.exceptions import IncompleteResultsError
199199

200+
relpath = str(filepath.relative_to(TF_LAYOUT.root))
200201
try:
201-
api.get(str(filepath))
202+
api.get(path=str(relpath), dataset=str(TF_LAYOUT.root))
202203
except IncompleteResultsError as exc:
203204
if exc.failed[0]["message"] == "path not associated with any dataset":
204205
from .conf import TF_GITHUB_SOURCE
205206

206207
api.install(path=TF_LAYOUT.root, source=TF_GITHUB_SOURCE, recursive=True)
207-
api.get(str(filepath))
208+
api.get(path=str(relpath), dataset=str(TF_LAYOUT.root))
208209
else:
209210
raise
210211

0 commit comments

Comments
 (0)