Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Fix some default_cc behavior
Browse files Browse the repository at this point in the history
Fixes #10245.
Fixes #10248.
  • Loading branch information
mxcl authored and Maria Neise committed Mar 19, 2012
1 parent dc4ba86 commit 385202e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Library/Homebrew/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 385202e

Please sign in to comment.