diff options
| author | Misty De Meo | 2015-12-04 14:40:24 -0800 |
|---|---|---|
| committer | Misty De Meo | 2015-12-07 13:17:43 -0800 |
| commit | 48bdd4811ec5ef54e4e408b0dcc4b7659c648a7d (patch) | |
| tree | 3c92f6c0979b3f4b53513a7201c5d976e4fe958d /Library/Homebrew/os/mac.rb | |
| parent | 3a1d7e7259440abe61cc1cc9319d179caba4e8b6 (diff) | |
| download | brew-48bdd4811ec5ef54e4e408b0dcc4b7659c648a7d.tar.bz2 | |
MacOS.sdk: return newest SDK if requested not found
`MacOS.sdk` and `.sdk_path` will now return the newest installed SDK
instead of nil if called on a system that doesn’t have an SDK for the
currently-installed OS. For example, Xcode 7 on OS X 10.10 does not
include the 10.10 SDK, only the 10.11 SDK; software can be built by
specifying both SDKROOT and MACOSX_DEPLOYMENT_TARGET.
Diffstat (limited to 'Library/Homebrew/os/mac.rb')
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 3 |
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 |
