code review

Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
William Woodruff 2025-02-03 17:12:11 +01:00
parent 04bde137e9
commit 0ceddc91ce
No known key found for this signature in database

View File

@ -57,23 +57,24 @@ module Homebrew
bottle = formula.bottle_for_tag(bottle_tag) bottle = formula.bottle_for_tag(bottle_tag)
if bottle.nil? if bottle
bottle.clear_cache if args.force?
bottle.fetch
begin
attestation = Homebrew::Attestation.check_core_attestation bottle
oh1 "#{bottle.filename} has a valid attestation"
json_results.push(attestation)
rescue Homebrew::Attestation::InvalidAttestationError => e
ofail <<~ERR
Failed to verify #{bottle.filename} with tag #{bottle_tag} due to error:
#{e}
ERR
end
else
opoo "Bottle for tag #{bottle_tag.to_sym.inspect} is unavailable." opoo "Bottle for tag #{bottle_tag.to_sym.inspect} is unavailable."
next next
end end
bottle.clear_cache if args.force?
bottle.fetch
begin
attestation = Homebrew::Attestation.check_core_attestation bottle
oh1 "#{bottle.filename} has a valid attestation"
json_results.push(attestation)
rescue Homebrew::Attestation::InvalidAttestationError => e
ofail <<~ERR
Failed to verify #{bottle.filename} with tag #{bottle_tag} due to error:
#{e}
ERR
end
end end
end end
end end