aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 893eb6ddf..ec1471e46 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -89,6 +89,9 @@ module OS
begin
@locator.sdk_for v
rescue SDKLocator::NoSDKError
+ sdk = @locator.latest_sdk
+ # don't return an SDK that's older than the OS version
+ sdk unless sdk.nil? || sdk.version < version
end
end