aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMax Howell2011-09-03 11:21:31 +0100
committerMax Howell2011-09-04 12:09:41 +0100
commit3545a8d302ebf19035e5ba25982b8461c3fb04c2 (patch)
treeb9551992850e591d6dda43d589f16236b8a4ae20 /Library/Homebrew/utils.rb
parentaad4b9d421e6f1608f4117c23f643f2da12b9c5b (diff)
downloadhomebrew-3545a8d302ebf19035e5ba25982b8461c3fb04c2.tar.bz2
Don't look for llvm-gcc in xcode_prefix
Look in /usr/bin because all versions of Xcode install it to /usr/bin now and this allows us to support Xcode-less installs of Apple's developer tools.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 43c83c14d..44595ac6a 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -325,13 +325,11 @@ module MacOS extend self
end
def llvm_build_version
- unless xcode_prefix.to_s.empty?
- llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc"
- # for Xcode 3 on OS X 10.5 this will not exist
- if llvm_gcc_path.file?
- `#{llvm_gcc_path} -v 2>&1` =~ /LLVM build (\d{4,})/
- $1.to_i # if nil this raises and then you fix the regex
- end
+ # for Xcode 3 on OS X 10.5 this will not exist
+ # NOTE may not be true anymore but we can't test
+ if File.exist? "/usr/bin/llvm-gcc"
+ `/usr/bin/llvm-gcc -v 2>&1` =~ /LLVM build (\d{4,})/
+ $1.to_i
end
end