cask/audit: also check binary for minimum OS #20119
Merged
+57
−30
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 style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Adds logic to
audit_min_os
for checking the load commands in an application's binary for its minimum macOS requirement if not specified byLSMinimumSystemVersion
of its Info.plist. It does this by fetching from Info.plist the binary path, ensuring it exists and is not a shell script (e.g.wings3d
), then looks in each slice forLC_VERSION_MIN_MACOSX
(older SDKs) orLC_BUILD_VERSION
(newer SDKs) for their minimum macOS version value, and returns the lowest value found. This will surface a few more minimum OS suggestions for casks that don't define any, e.g.alacritty
(multi-arch download) andcontour
(arch-specific downloads).Since this audit checks more than Info.plist, changed
plist_
references tobundle_
.Expect this audit to warn about:
calibre
(site says latest requires 14.x, but it'll run on 13.x) ortexstudio
.But as this is a strict audit, these won't trip up CI.