formula.rb: Don't attempt to mirror unstable URLs
If a build is being influenced by an option such as `--HEAD`. Don't attempt mirrors if a download fails. Fixes Homebrew/homebrew#7971.
This commit is contained in:
parent
bcea01ca0a
commit
e7aaeda953
@ -557,7 +557,9 @@ private
|
||||
# For brew-fetch and others.
|
||||
def fetch
|
||||
downloader = @downloader
|
||||
mirror_list = mirrors
|
||||
# Don't attempt mirrors if this install is not pointed at a "stable" URL.
|
||||
# This can happen when options like `--HEAD` are invoked.
|
||||
mirror_list = @spec_to_use == @stable ? mirrors : []
|
||||
|
||||
# Ensure the cache exists
|
||||
HOMEBREW_CACHE.mkpath
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user