aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-02-17 13:08:46 +0000
committerMax Howell2012-02-17 13:08:56 +0000
commit4fd8f268a3252d7fca0ed075157dda45f79c578d (patch)
tree54f9e96f47825f57e6a40e919c28a838a038c2fe /Library
parent6caf32a8e5a83eef7ba6ee70d0f53373b09ea219 (diff)
downloadhomebrew-4fd8f268a3252d7fca0ed075157dda45f79c578d.tar.bz2
Fix some default_cc behavior
Fixes #10245. Fixes #10248.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index bc0f570d9..b552a4121 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -269,7 +269,7 @@ module MacOS extend self
def default_cc
cc = `/usr/bin/xcrun -find cc 2> /dev/null`.chomp
cc = "#{dev_tools_path}/cc" if cc.empty?
- Pathname.new(cc).realpath.basename.to_s
+ Pathname.new(cc).realpath.basename.to_s rescue nil
end
def default_compiler
@@ -304,10 +304,9 @@ module MacOS extend self
end
end
- # usually /Developer
def xcode_prefix
@xcode_prefix ||= begin
- path = `/usr/bin/xcode-select -print-path 2>&1`.chomp
+ path = `/usr/bin/xcode-select -print-path 2>/dev/null`.chomp
path = Pathname.new path
if path.directory? and path.absolute?
path