Simplify condition.

This commit is contained in:
Markus Reiter 2023-03-13 02:40:03 +01:00 committed by GitHub
parent 90665b074e
commit b8cb1d1a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,8 +285,8 @@ class Resource
# glibc-bootstrap
if url.start_with?("https://github.com/Homebrew/glibc-bootstrap/releases/download")
if Homebrew::EnvConfig.artifact_domain.present?
extra_urls << url.sub("https://github.com", Homebrew::EnvConfig.artifact_domain)
if (artifact_domain = Homebrew::EnvConfig.artifact_domain.presence)
extra_urls << url.sub("https://github.com", artifact_domain)
end
if Homebrew::EnvConfig.bottle_domain != HOMEBREW_BOTTLE_DEFAULT_DOMAIN
tag, filename = url.split("/").last(2)