aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-03-18 15:14:14 +1300
committerMike McQuaid2012-03-18 15:16:57 +1300
commitd47cf55f68fb1d381cfbdc9de905dc33c7ce5a83 (patch)
treeb4d6733357293161971ffd52f36f1635c92adebd /Library/Homebrew/formula.rb
parent059727a9e8e5fc2e7a65727a1d81e31a8af72f89 (diff)
downloadbrew-d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83.tar.bz2
Use fetch for downloading bottles.
Fixes Homebrew/homebrew#10958.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 880316604..c26f0b319 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -443,10 +443,14 @@ public
# For brew-fetch and others.
def fetch
- downloader = @downloader
- # 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 == @standard ? mirrors : []
+ if install_bottle? self
+ downloader = CurlBottleDownloadStrategy.new bottle_url, name, version, nil
+ else
+ downloader = @downloader
+ # 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 == @standard ? mirrors : []
+ end
# Ensure the cache exists
HOMEBREW_CACHE.mkpath