Merge pull request #19654 from infogrind/fix_homepage

Correctly handle missing homepage in GitHub API response
This commit is contained in:
Mike McQuaid 2025-03-31 08:44:57 +00:00 committed by GitHub
commit 50bdbd657d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,11 +93,7 @@ module Homebrew
if @github
@desc = @github["description"]
@homepage = if @github["homepage"].empty?
"https://github.com/#{@github["full_name"]}"
else
@github["homepage"]
end
@homepage = @github["homepage"].presence || "https://github.com/#{@github["full_name"]}"
@license = @github["license"]["spdx_id"] if @github["license"]
end
end