Skip to content

Commit

Permalink
cask: fewer GitHub Actions warnings.
Browse files Browse the repository at this point in the history
- don't care about no checksums being defined for official casks
- don't complain about Gatekeeper being disabled on GitHub Actions as
  it's been globally disabled for the team
  • Loading branch information
MikeMcQuaid committed Dec 27, 2024
1 parent 882bb52 commit 907e341
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Library/Homebrew/cask/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def basename

sig { override.params(filename: Pathname).void }
def verify_download_integrity(filename)
if @cask.sha256 == :no_check
official_cask_tap = cask.tap&.official?
if @cask.sha256 == :no_check && !official_cask_tap
opoo "No checksum defined for cask '#{@cask}', skipping verification."
return
end
Expand Down
3 changes: 2 additions & 1 deletion Library/Homebrew/cask/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def install
backup if force? && @cask.staged_path.exist? && @cask.metadata_versioned_path.exist?

oh1 "Installing Cask #{Formatter.identifier(@cask)}"
opoo "macOS's Gatekeeper has been disabled for this Cask" unless quarantine?
# GitHub Actions globally disables Gatekeeper.
opoo "macOS's Gatekeeper has been disabled for this Cask" if !quarantine? && !GitHub::Actions.env_set?
stage

@cask.config = @cask.default_config.merge(old_config)
Expand Down

0 comments on commit 907e341

Please sign in to comment.