diff options
| author | Mike McQuaid | 2015-12-03 11:00:39 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2015-12-06 21:30:46 +0000 |
| commit | 17e5c1409f13e3456361ab842c1e87d560fd9ccc (patch) | |
| tree | b884a7b096c6b2d3235ca7a96cb9c135f45cd696 /Library | |
| parent | 98fbcb7299e882bee59802dc5c6bf4916d5576a5 (diff) | |
| download | brew-17e5c1409f13e3456361ab842c1e87d560fd9ccc.tar.bz2 | |
fetch: fall back to source if bottle fails.
This matches the behaviour when `brew install`ing formulae.
Closes Homebrew/homebrew#46490.
Closes Homebrew/homebrew#46619.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index ea642e6e9..fabe268e5 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -19,9 +19,21 @@ module Homebrew bucket.each do |f| f.print_tap_action :verb => "Fetching" + fetched_bottle = false if fetch_bottle?(f) - fetch_formula(f.bottle) - else + begin + fetch_formula(f.bottle) + rescue Exception => e + raise if ARGV.homebrew_developer? || e.is_a?(Interrupt) + fetched_bottle = false + onoe e.message + opoo "Bottle fetch failed: fetching the source." + else + fetched_bottle = true + end + end + + unless fetched_bottle fetch_formula(f) f.resources.each { |r| fetch_resource(r) } f.patchlist.each { |p| fetch_patch(p) if p.external? } |
