Catch JSON decoding errors in Apache download strategy
c.f. Homebrew/homebrew#17772.
This commit is contained in:
parent
c16ee6f300
commit
e22af69149
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user