diff options
| author | Jack Nagel | 2013-02-18 18:12:14 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-02-18 18:12:14 -0600 |
| commit | 3701081b65cbfd09024b95b0de2e154a3ba7478d (patch) | |
| tree | 530b1269e1d3a7d8eff71bd9c0f3f9b4b7da2386 | |
| parent | ada5033e0d1c382ef0fef87198bf74d41c4ec002 (diff) | |
| download | brew-3701081b65cbfd09024b95b0de2e154a3ba7478d.tar.bz2 | |
brew-mirror-check: fix error handling
| -rwxr-xr-x | Library/Contributions/cmd/brew-mirror-check.rb | 11 |
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 |
