Skip to content

Commit

Permalink
feat: check for unknown arch for casks
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Jun 28, 2024
1 parent 6d49157 commit 8e570a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,14 @@ def audit_rosetta
next
end

odebug result.merged_output

Check warning on line 593 in Library/Homebrew/cask/audit.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/audit.rb#L593

Added line #L593 was not covered by tests

unless /arm64|x86_64/.match?(result.merged_output)
add_error "Artifacts architecture is no longer supported by macOS!",
location: cask.url.location
next

Check warning on line 598 in Library/Homebrew/cask/audit.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/audit.rb#L598

Added line #L598 was not covered by tests
end

supports_arm = result.merged_output.include?("arm64")
mentions_rosetta = cask.caveats.include?("requires Rosetta 2")

Expand Down

0 comments on commit 8e570a0

Please sign in to comment.