From f3702b475bbd57ec4074b3f69c6b70ce0500bce2 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 27 Jul 2011 10:56:59 +0100 Subject: [PATCH] =?UTF-8?q?Raise=20if=20mirror=20can=E2=80=99t=20be=20dete?= =?UTF-8?q?rmined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust mirror ohai slightly. --- Library/Homebrew/download_strategy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 85acfd3d88..616f5f65c7 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 element content mirror_url = mirror_list[/([^<]+)/, 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