Permalink
Browse files

Fix some default_cc behavior

Fixes #10245.
Fixes #10248.
  • Loading branch information...
1 parent 07349a5 commit 22619d3e6b63bd42dbecb80201b99ffea921c2ab @mxcl mxcl committed with bric3 Feb 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 Library/Homebrew/utils.rb
@@ -269,7 +269,7 @@ def dev_tools_path
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 @@ def gcc_40_build_version
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

0 comments on commit 22619d3

Please sign in to comment.