aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2011-07-27 10:56:59 +0100
committerMax Howell2011-07-27 10:56:59 +0100
commit09dbffc02d985c0e36954f703c6f1fa557c49d28 (patch)
tree62a24fc31d097c107ad728846a89e6082e150c0e /Library
parent14e4db35a87bff0d7fe67e329b7c433ac3a8ed31 (diff)
downloadhomebrew-09dbffc02d985c0e36954f703c6f1fa557c49d28.tar.bz2
Raise if mirror can’t be determined
Adjust mirror ohai slightly.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 85acfd3d8..616f5f65c 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -137,7 +137,9 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy
# Yep, this is ghetto, grep the first <strong></strong> element content
mirror_url = mirror_list[/<strong>([^<]+)/, 1]
- ohai "Actually downloading from mirror: #{mirror_url}"
+ raise "Couldn't determine mirror. Try again later." if mirror_url.nil?
+
+ ohai "Best Mirror #{mirror_url}"
# Start download from that mirror
curl mirror_url, '-o', @tarball_path
end