mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
dvc dependency repo: Catch FileNotFoundError (#10501)
- When checkouting non-existent file the _checkout_file recursively calls os.stat on a symlinked file which destination doesn't exist. This causes a FileNotFoundError but it is not catched and it causes an unexpected error instead. Fixes #10500.
This commit is contained in:
@@ -115,7 +115,7 @@ class RepoDependency(Dependency):
|
||||
state=self.repo.state,
|
||||
prompt=confirm,
|
||||
)
|
||||
except CheckoutError:
|
||||
except (CheckoutError, FileNotFoundError):
|
||||
super().download(to=to, jobs=jobs)
|
||||
|
||||
def update(self, rev: Optional[str] = None):
|
||||
|
||||
Reference in New Issue
Block a user