Fix uses_from_macos checks with unsupported macOS versions and the internal API

This commit is contained in:
Rylan Polster
2025-11-05 16:49:34 -05:00
parent d772896687
commit 906d9a04d7
+7 -1
View File
@@ -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