Skip to content

Commit

Permalink
Merge pull request #17712 from Homebrew/homebrew_no_verify_attestations
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid authored Jul 13, 2024
2 parents 6b99ac5 + 4366ade commit 3ff8b65
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Library/Homebrew/attestation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ class GhAuthNeeded < RuntimeError; end
# @api private
sig { returns(T::Boolean) }
def self.enabled?
Homebrew::EnvConfig.verify_attestations? \
|| Homebrew::EnvConfig.developer? \
|| Homebrew::Settings.read("devcmdrun") == "true"
# TODO: allow this undocumented variable until this is rolled out more
# widely and then we can remove or document it.
return false if ENV.fetch("HOMEBREW_NO_VERIFY_ATTESTATIONS", false)

Homebrew::EnvConfig.verify_attestations? ||
Homebrew::EnvConfig.developer? ||
Homebrew::Settings.read("devcmdrun") == "true"
end

# Returns a path to a suitable `gh` executable for attestation verification.
Expand Down

0 comments on commit 3ff8b65

Please sign in to comment.