Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON file download failure fallback #14497

Merged
merged 2 commits into from
Feb 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Library/Homebrew/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def fetch_json_api_file(endpoint, target:)
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
Expand Down