diff --git a/poetry/installation/executor.py b/poetry/installation/executor.py index 59c0ab51020..ba117b3a7ad 100644 --- a/poetry/installation/executor.py +++ b/poetry/installation/executor.py @@ -608,7 +608,13 @@ def _download_link(self, operation, link): archive = self._chef.prepare(archive) if package.files: - archive_hash = "sha256:" + FileDependency(package.name, archive).hash() + archive_hash = ( + "sha256:" + + FileDependency( + package.name, + Path(archive.path) if isinstance(archive, Link) else archive, + ).hash() + ) if archive_hash not in {f["hash"] for f in package.files}: raise RuntimeError( "Invalid hash for {} using archive {}".format(package, archive.name)