Generate logs in verbose mode
Closes Homebrew/homebrew#23654. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
643469a17c
commit
71f0ad069d
@ -567,9 +567,6 @@ class Formula
|
||||
ENV.remove_cc_etc
|
||||
end
|
||||
|
||||
if ARGV.verbose?
|
||||
safe_system cmd, *args
|
||||
else
|
||||
@exec_count ||= 0
|
||||
@exec_count += 1
|
||||
logd = HOMEBREW_LOGS/name
|
||||
@ -589,20 +586,22 @@ class Formula
|
||||
wr.close
|
||||
|
||||
File.open(logfn, 'w') do |f|
|
||||
f.write(rd.read) until rd.eof?
|
||||
while buf = rd.gets
|
||||
f.puts buf
|
||||
puts buf if ARGV.verbose?
|
||||
end
|
||||
|
||||
Process.wait
|
||||
|
||||
unless $?.success?
|
||||
f.flush
|
||||
Kernel.system "/usr/bin/tail", "-n", "5", logfn
|
||||
Kernel.system "/usr/bin/tail", "-n", "5", logfn unless ARGV.verbose?
|
||||
f.puts
|
||||
require 'cmd/--config'
|
||||
Homebrew.write_build_config(f)
|
||||
raise ErrorDuringExecution
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue ErrorDuringExecution
|
||||
raise BuildError.new(self, cmd, args, $?)
|
||||
ensure
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user