attestion: make InvalidAttestationError non-fatal in CI

I don't think I've seen an `InvalidAttestationError` that wasn't some
sort of network problem (e.g., rate limit, connection timeout, 503).
Let's emit a warning instead of erroring out.

Note that `MissingAttestationError` is still fatal, and that will still
produce errors in CI.
This commit is contained in:
Carlo Cabrera 2024-10-03 17:01:18 +08:00
parent 3994768349
commit d0e4aea853
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -246,6 +246,12 @@ module Homebrew
end
backfill_attestation
rescue InvalidAttestationError => e
raise if ENV["HOMEBREW_GITHUB_ACTIONS"].blank?
opoo "Attestation verification failed (please verify that this is not a network error before rebottling): #{e}"
{}
end
end
end