From ad1500ad6012a454b4d3e635cdf20288820eb6bf Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 14 Jul 2024 16:30:12 -0400 Subject: [PATCH] Apply suggestions from code review --- Library/Homebrew/attestation.rb | 4 ++-- Library/Homebrew/test/attestation_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/attestation.rb b/Library/Homebrew/attestation.rb index a27124f541..912f531a74 100644 --- a/Library/Homebrew/attestation.rb +++ b/Library/Homebrew/attestation.rb @@ -62,7 +62,7 @@ module Homebrew # @api private sig { returns(Pathname) } def self.gh_executable - # NOTE: We disable HOMEBREW_NO_VERIFY_ATTESTATIONS when installing `gh` itself, + # 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(with_env(HOMEBREW_NO_VERIFY_ATTESTATIONS: "1") do @@ -111,7 +111,7 @@ module Homebrew .stdout.match(/\d+(?:\.\d+)+/i).to_s) if gh_version < GH_ATTESTATION_MIN_VERSION raise e, - "#{gh_executable} is too old, you must upgrade it to continue." + "#{gh_executable} is too old, you must upgrade it to continue" end raise InvalidAttestationError, "attestation verification failed: #{e}" diff --git a/Library/Homebrew/test/attestation_spec.rb b/Library/Homebrew/test/attestation_spec.rb index bde80468ca..64240d33d3 100644 --- a/Library/Homebrew/test/attestation_spec.rb +++ b/Library/Homebrew/test/attestation_spec.rb @@ -77,7 +77,7 @@ RSpec.describe Homebrew::Attestation do end end - describe "::check_attestation (with old gh)" do + describe "::check_attestation fails with old gh" do before do allow(described_class).to receive(:gh_executable) .and_return(fake_old_gh)