Skip to content

Commit 20c55f6

Browse files
committed
audit_min_os: only use sparkle_min_os as fallback
`Cask::Audit#audit_min_os` uses the minimum macOS version requirement from the app bundle and newest item in the Sparkle feed but these values are treated equally in the code. We recently came across a cask where the app specified High Sierra (10.13) as the minimum macOS version but the Sparkle appcast used 26.0.0 (Tahoe) as the `minimumSystemVersion` value, so this audit incorrectly requires `depends_on macos: ">= :tahoe"` in the cask. The app and the upstream website both advertise the 10.13 macOS requirement, so the appcast value needs to be fixed. However, this highlighted a shortcoming in the audit logic, as we probably shouldn't allow the Sparkle minimum macOS value to override what's specified in the app. This updates the logic to only fall back to the `sparkle_min_os` value when `bundle_min_os` isn't `nil`, so it won't override `bundle_min_os` when the Sparkle value is higher.
1 parent 43fa5f5 commit 20c55f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/cask/audit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def audit_min_os
774774
bundle_min_os = cask_bundle_min_os
775775
sparkle_min_os = cask_sparkle_min_os
776776

777-
app_min_os = [bundle_min_os, sparkle_min_os].compact.max
777+
app_min_os = bundle_min_os || sparkle_min_os
778778
debug_messages = []
779779
debug_messages << "from artifact: #{bundle_min_os.to_sym}" if bundle_min_os
780780
debug_messages << "from upstream: #{sparkle_min_os.to_sym}" if sparkle_min_os

0 commit comments

Comments
 (0)