From d63ef14794c60464108be85cb5eeedb829261cab Mon Sep 17 00:00:00 2001 From: Drew Rodman Date: Tue, 18 Feb 2014 15:08:03 -0500 Subject: 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 Homebrew/homebrew#18364. Closes Homebrew/homebrew#26618. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/upgrade.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3