attestation: show unit of time for retry message

Otherwise this just shows a message like

    Failed to verify attestation. Retrying in 27...

which is a little vague. Let's make it clear that that refers to
seconds.
This commit is contained in:
Carlo Cabrera 2024-10-09 23:24:24 +08:00
parent 9fd572f8ad
commit 98647ff0af
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -253,7 +253,7 @@ module Homebrew
raise if @attestation_retry_count[bottle] >= ATTESTATION_MAX_RETRIES raise if @attestation_retry_count[bottle] >= ATTESTATION_MAX_RETRIES
sleep_time = 3 ** @attestation_retry_count[bottle] sleep_time = 3 ** @attestation_retry_count[bottle]
opoo "Failed to verify attestation. Retrying in #{sleep_time}..." opoo "Failed to verify attestation. Retrying in #{sleep_time}s..."
sleep sleep_time if ENV["HOMEBREW_TESTS"].blank? sleep sleep_time if ENV["HOMEBREW_TESTS"].blank?
@attestation_retry_count[bottle] += 1 @attestation_retry_count[bottle] += 1
retry retry