diff options
| author | Jack Nagel | 2013-07-20 22:40:22 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-07-20 22:40:22 -0500 |
| commit | e23a3492f44b616fc72d270519e2f0ae7cd782f0 (patch) | |
| tree | 48acb8012cc78c8d58f59752400de4837d361d8e | |
| parent | 8e0158b4d74b3724d31cd284ce362b07f5678d9f (diff) | |
| download | brew-e23a3492f44b616fc72d270519e2f0ae7cd782f0.tar.bz2 | |
Don't report llvm-gcc if it's actually clang
| -rw-r--r-- | Library/Homebrew/macos.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index c56919949..e884000dd 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -126,10 +126,10 @@ module MacOS extend self def llvm_build_version # for Xcode 3 on OS X 10.5 this will not exist # NOTE may not be true anymore but we can't test - @llvm_build_version ||= if locate("llvm-gcc") - `#{locate("llvm-gcc")} --version` =~ /LLVM build (\d{4,})/ - $1.to_i - end + @llvm_build_version ||= + if (path = locate("llvm-gcc")) && path.realpath.basename.to_s !~ /^clang/ + %x{#{path} --version}[/LLVM build (\d{4,})/, 1].to_i + end end def clang_version |
