diff --git a/Library/Homebrew/utils/github/artifacts.rb b/Library/Homebrew/utils/github/artifacts.rb index 9e0756a5f1a8f..607ee521f9bc6 100644 --- a/Library/Homebrew/utils/github/artifacts.rb +++ b/Library/Homebrew/utils/github/artifacts.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require "download_strategy" @@ -24,12 +24,14 @@ def self.download_artifact(url, artifact_id) # Strategy for downloading an artifact from GitHub Actions. class GitHubArtifactDownloadStrategy < AbstractFileDownloadStrategy + sig { params(url: String, artifact_id: String, token: String).void } def initialize(url, artifact_id, token:) super(url, "artifact", artifact_id) - @cache = HOMEBREW_CACHE/"gh-actions-artifact" - @token = token + @cache = T.let(HOMEBREW_CACHE/"gh-actions-artifact", Pathname) + @token = T.let(token, String) end + sig { params(timeout: T.nilable(Integer)).void } def fetch(timeout: nil) ohai "Downloading #{url}" if cached_location.exist?