Fix some default_cc behavior
Fixes Homebrew/homebrew#10245. Fixes Homebrew/homebrew#10248.
This commit is contained in:
parent
ba61d3013a
commit
30cbb25147
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user