aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/upgrade.rb
diff options
context:
space:
mode:
authorDrew Rodman2014-02-18 15:08:03 -0500
committerJack Nagel2014-02-18 15:08:03 -0500
commitc9bccb21873fe765dff681b005a330553cded898 (patch)
tree17b650de2eb15a04a2adf0c2739908a28d4bd2d1 /Library/Homebrew/cmd/upgrade.rb
parenta53c2ac56024d0bf5dfc2b0dac8a11d2341cc6f5 (diff)
downloadhomebrew-c9bccb21873fe765dff681b005a330553cded898.tar.bz2
Add DownloadError to catch a broader range of resource download errors.
Adding a broader exception class allows for errors raised in Resource.fetch to be caught in upgrade and prevent the process from being killed when a download fails. This should resolve issue 18364. Fixes #18364. Closes #26618. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/upgrade.rb')
-rw-r--r--Library/Homebrew/cmd/upgrade.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index a68830a94..7682922b4 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -92,6 +92,8 @@ module Homebrew extend self
e.dump
puts
Homebrew.failed = true
+ rescue DownloadError => e
+ ofail e
ensure
# restore previous installation state if build failed
outdated_keg.link if outdated_keg and not f.installed? rescue nil