Filter Linux cask loads by support#22149
Merged
MikeMcQuaid merged 1 commit intomainfrom May 7, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Linux failures in tap syntax checks by avoiding eager loading of macOS-only casks in a Linux context (where macOS-only sha256 arm:/intel: shorthand can be invalid), while still ensuring Linux-supported casks are loaded on Linux so Linux-specific syntax errors are detected.
Changes:
- Update
brew audit --tapto filter cask loading via a helper that skips macOS-only casks when auditing on Linux. - Implement Linux-specific cask validation in
Readall.valid_casks?by first identifying Linux-supported casks (under a macOS simulation) and then loading those casks under a Linux simulation. - Add/adjust tests covering the new Linux tap cask-loading behavior for both
auditandreadall.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/dev-cmd/audit.rb | Adds cask_for_audit and uses it to avoid loading macOS-only casks on Linux during --tap/--changed collection. |
| Library/Homebrew/readall.rb | Implements Linux-only cask loading/validation by filtering for Linux-supported casks and then loading them under Linux simulation. |
| Library/Homebrew/extend/os/mac/readall.rb | Delegates Linux validation to the base Readall.valid_casks? implementation when os_name == :linux. |
| Library/Homebrew/test/dev-cmd/audit_spec.rb | Adds a regression test to ensure brew audit --tap on Linux skips macOS-only casks but still loads Linux-supported casks. |
| Library/Homebrew/test/cmd/readall_spec.rb | Adds a test asserting Linux readall output excludes macOS-only casks while still reporting Linux-supported cask failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
28bcebe to
d6e26a5
Compare
- Keep `brew audit --tap` and `brew readall` loading Linux-supported casks so Linux syntax errors still surface. - Skip macOS-only casks before Linux reloads because their macOS `sha256 arm:/intel:` shorthand is invalid in a Linux context. - Fixes #22148.
d6e26a5 to
f624b6d
Compare
SMillerDev
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew audit --tapand addbrew readallloading Linux-supported casks so Linux syntax errors still surface.sha256 arm:/intel:shorthand is invalid in a Linux context.Fixes #22148.
brew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 with local review and tweaks