aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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