Skip to content

Commit

Permalink
utils/pypi: warn when pypi_info fails due to missing sources
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed Feb 5, 2025
1 parent a600438 commit 46d67ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Library/Homebrew/utils/pypi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def pypi_info(new_version: nil)
end
end

return if dist.nil?
if dist.nil?
onoe "#{name} exists on PyPI but lacks a suitable source distribution"
return

Check warning on line 91 in Library/Homebrew/utils/pypi.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/pypi.rb#L91

Added line #L91 was not covered by tests
end

@pypi_info = [
PyPI.normalize_python_package(json["info"]["name"]), dist["url"],
Expand Down

0 comments on commit 46d67ba

Please sign in to comment.