mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
Fix uses_from_macos checks with unsupported macOS versions and the internal API
This commit is contained in:
@@ -352,7 +352,13 @@ class UsesFromMacOSDependency < Dependency
|
||||
MacOSVersion.from_symbol(Homebrew::SimulateSystem.current_os)
|
||||
end
|
||||
|
||||
since_os = MacOSVersion.from_symbol(since_os_bounds)
|
||||
since_os = begin
|
||||
MacOSVersion.from_symbol(since_os_bounds)
|
||||
rescue MacOSVersion::Error
|
||||
# If we can't parse the bound, it means it's an unsupported macOS version
|
||||
# so let's default to the oldest possible macOS version
|
||||
Version::NULL
|
||||
end
|
||||
return true if effective_os >= since_os
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user