diff options
| author | Mike McQuaid | 2012-03-18 15:14:14 +1300 |
|---|---|---|
| committer | Mike McQuaid | 2012-03-18 15:16:57 +1300 |
| commit | d47cf55f68fb1d381cfbdc9de905dc33c7ce5a83 (patch) | |
| tree | b4d6733357293161971ffd52f36f1635c92adebd /Library/Homebrew/formula.rb | |
| parent | 059727a9e8e5fc2e7a65727a1d81e31a8af72f89 (diff) | |
| download | brew-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.rb | 12 |
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 |
