Skip to content
Snippets Groups Projects
Commit df1d27b0 authored by Jack Nagel's avatar Jack Nagel
Browse files

superenv/cc: keep exec monkeypatch out of Object

parent 4adf0b0f
No related branches found
No related tags found
No related merge requests found
......@@ -21,18 +21,20 @@ def syspath
%W{/usr /usr/local}
end
end
def exec *args
path = File.expand_path('~/Library/Logs/Homebrew/cc.log')
open(path, 'a') do |f|
f.print '[', $0
f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG']
f.print '] '
f.puts args.join(' ')
f.puts
end
Kernel.exec *args
end if ENV['HOMEBREW_LOG']
module ExecLogExtension
def exec *args
path = File.expand_path('~/Library/Logs/Homebrew/cc.log')
open(path, 'a') do |f|
f.print '[', $0
f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG']
f.print '] '
f.puts args.join(' ')
f.puts
end
Kernel.exec *args
end
end
class Cmd
def initialize path, args
......@@ -206,6 +208,7 @@ if __FILE__ == $PROGRAM_NAME
end
####################################################################### main
extend(ExecLogExtension) if ENV['HOMEBREW_LOG']
cmd = Cmd.new($0, ARGV)
exec "xcrun", cmd.tool, *cmd.args
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment