aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-10-04 18:35:14 -0700
committerCharlie Sharpsteen2011-10-04 18:36:31 -0700
commit45365e0ecb0858e7aa96dc8c40cc2b9c5d6db834 (patch)
tree0d7c3c14ceddb8e160fe5ba63505c92e929f478a /Library
parent16aeea55fd9858bf1eb6af411f48202dbeda53ef (diff)
downloadhomebrew-45365e0ecb0858e7aa96dc8c40cc2b9c5d6db834.tar.bz2
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 #7971.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 6143a4689..c2aeec8de 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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