Restore HOMEBREW_LOG functionality
This commit is contained in:
parent
532c849b58
commit
64927a45ef
@ -21,6 +21,18 @@ def syspath
|
|||||||
%W{/usr /usr/local}
|
%W{/usr /usr/local}
|
||||||
end
|
end
|
||||||
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']
|
||||||
|
|
||||||
|
|
||||||
class Cmd
|
class Cmd
|
||||||
def initialize path, args
|
def initialize path, args
|
||||||
|
|||||||
@ -4,8 +4,6 @@
|
|||||||
# But many build-systems expect it to work. This fixes that.
|
# But many build-systems expect it to work. This fixes that.
|
||||||
# NOTE only works if the build-tool calls xcrun without a path prefixed!
|
# NOTE only works if the build-tool calls xcrun without a path prefixed!
|
||||||
|
|
||||||
ENV['HOMEBREW_LOG'] = nil
|
|
||||||
|
|
||||||
require "#{File.dirname __FILE__}/../libsuperenv"
|
require "#{File.dirname __FILE__}/../libsuperenv"
|
||||||
SUPERBIN = __FILE__.dirname.cleanpath.freeze
|
SUPERBIN = __FILE__.dirname.cleanpath.freeze
|
||||||
|
|
||||||
|
|||||||
@ -25,20 +25,5 @@ class Array
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
module Kernel extend self
|
|
||||||
alias :_exec :exec
|
|
||||||
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
|
|
||||||
_exec *args
|
|
||||||
end
|
|
||||||
end if ENV['HOMEBREW_LOG']
|
|
||||||
|
|
||||||
$brewfix = "#{__FILE__}/../../../".cleanpath.freeze
|
$brewfix = "#{__FILE__}/../../../".cleanpath.freeze
|
||||||
$sdkroot = ENV['HOMEBREW_SDKROOT'].freeze
|
$sdkroot = ENV['HOMEBREW_SDKROOT'].freeze
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user