Fix JSON file download failure fallback

This commit is contained in:
Rylan Polster 2023-02-04 01:46:50 +01:00
parent 791022dc21
commit cbda171c2b
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -54,6 +54,7 @@ module Homebrew
raise if target.empty?
opoo "#{target.basename}: update failed, falling back to cached version."
JSON.parse(target.read)
rescue JSON::ParserError
target.unlink
retry_count += 1