Skip to content

Commit b6d48be

Browse files
committed
fail hard
1 parent 22c2655 commit b6d48be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/poetry/repositories/http_repository.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ def _links_to_data(self, links: list[Link], data: PackageInfo) -> dict[str, Any]
372372
else:
373373
files.append({"file": link.filename, "hash": file_hash})
374374

375+
if not files:
376+
raise PackageNotFoundError(
377+
f'Could not determine a hash for any distribution link for package: "{data.name}" version:'
378+
f' "{data.version}"'
379+
)
380+
375381
data.files = files
376382

377383
# drop yanked files unless the entire release is yanked

0 commit comments

Comments
 (0)