Skip to content
Snippets Groups Projects
Commit e22af691 authored by Jack Nagel's avatar Jack Nagel
Browse files

Catch JSON decoding errors in Apache download strategy

c.f. Homebrew/homebrew#17772.
parent c16ee6f3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment