mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
fallback_on_error: fix Naming/PredicateMethod error
This commit is contained in:
parent
00b668a214
commit
319542ef44
@ -91,7 +91,7 @@ class Bottle
|
||||
def fetch(verify_download_integrity: true, timeout: nil, quiet: false)
|
||||
resource.fetch(verify_download_integrity:, timeout:, quiet:)
|
||||
rescue DownloadError
|
||||
raise unless fallback_on_error
|
||||
raise unless fallback_on_error?
|
||||
|
||||
fetch_tab
|
||||
retry
|
||||
@ -121,7 +121,7 @@ class Bottle
|
||||
begin
|
||||
resource.fetch(timeout:, quiet:)
|
||||
rescue DownloadError
|
||||
raise unless fallback_on_error
|
||||
raise unless fallback_on_error?
|
||||
|
||||
retry
|
||||
rescue Resource::BottleManifest::Error
|
||||
@ -193,7 +193,7 @@ class Bottle
|
||||
specs
|
||||
end
|
||||
|
||||
def fallback_on_error
|
||||
def fallback_on_error?
|
||||
# Use the default bottle domain as a fallback mirror
|
||||
if @resource.url.start_with?(Homebrew::EnvConfig.bottle_domain) &&
|
||||
Homebrew::EnvConfig.bottle_domain != HOMEBREW_BOTTLE_DEFAULT_DOMAIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user