Fix type and style errors

This commit is contained in:
Nanda H Krishna 2024-07-15 11:44:53 -04:00
parent 3bb91601fb
commit 4d387d285e
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA
2 changed files with 3 additions and 2 deletions

View File

@ -75,6 +75,7 @@ module Homebrew
# NOTE: We set HOMEBREW_NO_VERIFY_ATTESTATIONS when installing `gh` itself,
# to prevent a cycle during bootstrapping. This can eventually be resolved
# by vendoring a pure-Ruby Sigstore verifier client.
@gh_executable ||= T.let(nil, T.nilable(Pathname))
return @gh_executable if @gh_executable.present?
with_env(HOMEBREW_NO_VERIFY_ATTESTATIONS: "1") do
@ -88,7 +89,7 @@ module Homebrew
end
end
@gh_executable
T.must(@gh_executable)
end
# Verifies the given bottle against a cryptographic attestation of build provenance.

View File

@ -265,7 +265,7 @@ module Homebrew
if Homebrew::Attestation.enabled?
if formulae.include?(Formula["gh"])
formulae.unshift(formulae.delete(Formula["gh"]))
formulae.unshift(T.must(formulae.delete(Formula["gh"])))
else
Homebrew::Attestation.ensure_gh_installed!
end