diff options
| author | Jack Nagel | 2012-07-27 02:38:10 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-07-27 02:40:44 -0500 |
| commit | 4dde88b6d3e17cd9a9b5bbe6ac300a1f8a148a40 (patch) | |
| tree | a1d62e5385cec1cf010dfe79441fe0174c304ea8 /Library/Homebrew/macos.rb | |
| parent | 8d949520ecddf87ad521853bb3caf3152e5488cf (diff) | |
| download | brew-4dde88b6d3e17cd9a9b5bbe6ac300a1f8a148a40.tar.bz2 | |
Un-break MacOS.sdk_path
MacOS.sdk_path is meant to return the SDK path that matches the version
argument, so store the result in a hash.
Fixes Homebrew/homebrew#13623.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/macos.rb')
| -rw-r--r-- | Library/Homebrew/macos.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 21c3bc7af..80f8b3d2d 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -92,10 +92,11 @@ module MacOS extend self end def sdk_path v=version - @sdk_path ||= begin + @sdk_path ||= {} + @sdk_path[v.to_s] ||= begin path = if not Xcode.bad_xcode_select_path? and File.executable? "#{Xcode.folder}/usr/bin/make" `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.strip - elsif File.directory? '/Developer/SDKs/MacOS#{v}.sdk' + elsif File.directory? "/Developer/SDKs/MacOS#{v}.sdk" # the old default (or wild wild west style) "/Developer/SDKs/MacOS#{v}.sdk" elsif File.directory? "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk" |
