diff --git a/Library/Contributions/cmd/brew-mirror-check.rb b/Library/Contributions/cmd/brew-mirror-check.rb index 821a625260..ed8e5364f6 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