diff options
| author | ilovezfs | 2016-03-30 04:03:19 -0700 |
|---|---|---|
| committer | Xu Cheng | 2016-03-31 13:16:50 +0800 |
| commit | 7651757709b2eaa537cbda17271b127ed59568cf (patch) | |
| tree | 06c7e256dd2c2d6a2150f61a7e0662d9ad0018ce | |
| parent | 45e138ffc6059570421dc203c2e69ba5214cdfaa (diff) | |
| download | brew-7651757709b2eaa537cbda17271b127ed59568cf.tar.bz2 | |
OS::Mac::sdk: remove ensure block
Don't use ensure to do the final check because it won't affect the
return value of the overall function.
Thanks to @xucheng for catching this bug.
Closes Homebrew/homebrew#50536.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index a9227d790..096cfb24b 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -100,10 +100,9 @@ module OS end rescue SDKLocator::NoSDKError sdk = @locator.latest_sdk - ensure - # only return an SDK older than the OS version if it was specifically requested - sdk if v || (!sdk.nil? && sdk.version >= version) end + # Only return an SDK older than the OS version if it was specifically requested + sdk if v || (!sdk.nil? && sdk.version >= version) end # Returns the path to an SDK or nil, following the rules set by #sdk. |
