From e22af691494137a6a362abf38f37bcee062b25e7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 11 Feb 2013 17:14:25 -0600 Subject: [PATCH] Catch JSON decoding errors in Apache download strategy c.f. Homebrew/homebrew#17772. --- Library/Homebrew/download_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 07e700cdc1..7d6f972621 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -158,7 +158,7 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy ohai "Best Mirror #{url}" curl url, '-C', downloaded_size, '-o', @temporary_path - rescue IndexError + rescue IndexError, MultiJson::DecodeError raise "Couldn't determine mirror. Try again later." end end