attestations: widen the beta
This widens the beta to include people with developer mode enabled, as well as those with HOMEBREW_DEVELOPER set in their environment. Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
parent
f5adff9d90
commit
570cf65523
@ -40,6 +40,16 @@ module Homebrew
|
||||
# @api private
|
||||
class GhAuthNeeded < RuntimeError; end
|
||||
|
||||
# Returns whether attestation verification is enabled.
|
||||
#
|
||||
# @api private
|
||||
sig { returns(T::Boolean) }
|
||||
def self.enabled?
|
||||
Homebrew::EnvConfig.verify_attestations? \
|
||||
|| Homebrew::EnvConfig.developer? \
|
||||
|| Homebrew::Settings.read("devcmdrun") == "true"
|
||||
end
|
||||
|
||||
# Returns a path to a suitable `gh` executable for attestation verification.
|
||||
#
|
||||
# @api private
|
||||
|
||||
@ -1258,7 +1258,7 @@ on_request: installed_on_request?, options:)
|
||||
def pour
|
||||
# We skip `gh` to avoid a bootstrapping cycle, in the off-chance a user attempts
|
||||
# to explicitly `brew install gh` without already having a version for bootstrapping.
|
||||
if Homebrew::EnvConfig.verify_attestations? && formula.tap&.core_tap? && formula.name != "gh"
|
||||
if Homebrew::Attestation.enabled? && formula.tap&.core_tap? && formula.name != "gh"
|
||||
ohai "Verifying attestation for #{formula.name}"
|
||||
begin
|
||||
Homebrew::Attestation.check_core_attestation formula.bottle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user