move InvalidAttestationError into Attestation mod
Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
parent
5ec3dab141
commit
2efef36313
@ -30,6 +30,11 @@ module Homebrew
|
||||
# @api private
|
||||
BACKFILL_CUTOFF = DateTime.new(2024, 3, 14).freeze
|
||||
|
||||
# Raised when attestation verification fails.
|
||||
#
|
||||
# @api private
|
||||
class InvalidAttestationError < RuntimeError; end
|
||||
|
||||
# Returns a path to a suitable `gh` executable for attestation verification.
|
||||
#
|
||||
# @api private
|
||||
|
||||
@ -783,6 +783,3 @@ class CyclicDependencyError < RuntimeError
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
# Raised when attestation verification fails.
|
||||
class InvalidAttestationError < RuntimeError; end
|
||||
|
||||
@ -1261,7 +1261,7 @@ on_request: installed_on_request?, options:)
|
||||
ohai "Verifying attestation for #{formula.name}"
|
||||
begin
|
||||
Homebrew::Attestation.check_core_attestation formula.bottle
|
||||
rescue InvalidAttestationError => e
|
||||
rescue Homebrew::Attestation::InvalidAttestationError => e
|
||||
raise CannotInstallFormulaError, <<~EOS
|
||||
The bottle for #{formula.name} has an invalid build provenance attestation.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user