aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/macos/xcode.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-31 09:51:08 -0400
committerMax Howell2012-08-31 10:22:11 -0400
commitbbe75d3efbfe9cece5ee161882c0002c9697a047 (patch)
tree83db487b22f8301818fc6b01570533f9745ebd44 /Library/Homebrew/macos/xcode.rb
parentc4d95a093488fdb388ec841c4ae56a2dc677353f (diff)
downloadhomebrew-bbe75d3efbfe9cece5ee161882c0002c9697a047.tar.bz2
MacOS.sdk_path is unlicensed Xcode aware
Now we should get an sdk_path, but tools like xcodebuild, xcode-select and xcrun will still error out. But at least more of Homebrew will work. Also putting the Xcode 3 path finder last. We get bug reports because newer Xcodes are installed in parallel to older Xcodes. We want to find and use the newer Xcode's first. Xcode.prefix is pretty smart about that. Refs #14558.
Diffstat (limited to 'Library/Homebrew/macos/xcode.rb')
-rw-r--r--Library/Homebrew/macos/xcode.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/macos/xcode.rb b/Library/Homebrew/macos/xcode.rb
index b7a3a26c9..120d9b3d2 100644
--- a/Library/Homebrew/macos/xcode.rb
+++ b/Library/Homebrew/macos/xcode.rb
@@ -7,6 +7,7 @@ module MacOS::Xcode extend self
# Locate the "current Xcode folder" via xcode-select. See:
# man xcode-select
+ # NOTE!! use Xcode.prefix rather than this generally!
def folder
@folder ||= `xcode-select -print-path 2>/dev/null`.strip
end
@@ -31,7 +32,7 @@ module MacOS::Xcode extend self
def prefix
@prefix ||= begin
- path = Pathname.new folder
+ path = Pathname.new(folder)
if path.absolute? and (path/'usr/bin/make').executable?
path
elsif File.executable? '/Developer/usr/bin/make'