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
commite7aaeda953e84fdc1965fb27cc0af579224ed3a5 (patch)
tree017f32d1bd5ef2a0d56c5731e51c7caef7cd8eba /Library
parentbcea01ca0a6c9b37d2f147cfc577b93ebd7678f8 (diff)
downloadbrew-e7aaeda953e84fdc1965fb27cc0af579224ed3a5.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 Homebrew/homebrew#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