aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-02-18 18:12:14 -0600
committerJack Nagel2013-02-18 18:12:14 -0600
commit8dcace79e9ae4aa09167c2f7f61e2eb6516caa1d (patch)
tree5d0db56017b6ee2145965b059217d88403f3dd04
parent4ffd1f078f9739183fd84417ee7b8a709970926b (diff)
downloadhomebrew-8dcace79e9ae4aa09167c2f7f61e2eb6516caa1d.tar.bz2
brew-mirror-check: fix error handling
-rwxr-xr-xLibrary/Contributions/cmd/brew-mirror-check.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Contributions/cmd/brew-mirror-check.rb b/Library/Contributions/cmd/brew-mirror-check.rb
index 821a62526..ed8e5364f 100755
--- a/Library/Contributions/cmd/brew-mirror-check.rb
+++ b/Library/Contributions/cmd/brew-mirror-check.rb
@@ -12,13 +12,10 @@ class Formula
tarball_path = downloader.tarball_path
tarball_path.unlink if tarball_path.exist?
- begin
- fetched = downloader.fetch
- rescue DownloadError => e
- opoo "Failed to fetch from URL: #{url}"
- return
- end
-
+ fetched = downloader.fetch
+ rescue StandardError
+ opoo "Failed to fetch from URL: #{url}"
+ else
verify_download_integrity fetched if fetched.kind_of? Pathname
end
end