MacOS.sdk_path: make sure xcode-select is sane
According to a user on IRC with a brand-new Mac, xcode-select is preconfigured to /Developer out of the box even though that doesn't exist on modern Xcode. So we shouldn't trust that it makes any sense.
This commit is contained in:
parent
31d152780b
commit
cd34b164b2
@ -361,7 +361,7 @@ module MacOS extend self
|
||||
|
||||
def sdk_path(v=MacOS.version)
|
||||
# The path of the MacOSX SDK.
|
||||
if not MacOS.xctools_fucked?
|
||||
if !MacOS.xctools_fucked? and File.directory? `xcode-select -print-path`.chomp
|
||||
path = `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.chomp.chomp
|
||||
elsif File.directory? '/Developer/SDKs/MacOS#{v}.sdk'
|
||||
# the old default (or wild wild west style)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user