Merge pull request #17712 from Homebrew/homebrew_no_verify_attestations

This commit is contained in:
Mike McQuaid 2024-07-13 17:50:35 -04:00 committed by GitHub
commit 3ff8b65109
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,9 +45,13 @@ module Homebrew
# @api private # @api private
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def self.enabled? def self.enabled?
Homebrew::EnvConfig.verify_attestations? \ # TODO: allow this undocumented variable until this is rolled out more
|| Homebrew::EnvConfig.developer? \ # widely and then we can remove or document it.
|| Homebrew::Settings.read("devcmdrun") == "true" return false if ENV.fetch("HOMEBREW_NO_VERIFY_ATTESTATIONS", false)
Homebrew::EnvConfig.verify_attestations? ||
Homebrew::EnvConfig.developer? ||
Homebrew::Settings.read("devcmdrun") == "true"
end end
# Returns a path to a suitable `gh` executable for attestation verification. # Returns a path to a suitable `gh` executable for attestation verification.