Only handle build-errors when it's a build-error
Refs Homebrew/homebrew#15164.
This commit is contained in:
parent
cc932ca668
commit
7a75915345
@ -112,6 +112,13 @@ module Homebrew extend self
|
||||
puts "X11: #{describe_x11}"
|
||||
end
|
||||
|
||||
def write_build_config f
|
||||
$f = f
|
||||
def Homebrew.puts(*foo); $f.puts(*foo); end
|
||||
Homebrew.dump_build_config
|
||||
class << Homebrew; undef :puts; end
|
||||
end
|
||||
|
||||
def dump_verbose_config
|
||||
puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
|
||||
puts "HEAD: #{head}"
|
||||
|
||||
@ -542,29 +542,24 @@ protected
|
||||
f.write(rd.read) until rd.eof?
|
||||
|
||||
Process.wait
|
||||
raise unless $?.success?
|
||||
|
||||
unless $?.success?
|
||||
unless ARGV.verbose?
|
||||
f.flush
|
||||
Kernel.system "/usr/bin/tail -n 5 #{logfn}"
|
||||
end
|
||||
f.puts
|
||||
require 'cmd/--config'
|
||||
Homebrew.write_build_config(f)
|
||||
raise BuildError.new(self, cmd, args, $?)
|
||||
end
|
||||
end
|
||||
|
||||
removed_ENV_variables.each do |key, value|
|
||||
ENV[key] = value # ENV.kind_of? Hash # => false
|
||||
end if removed_ENV_variables
|
||||
|
||||
rescue
|
||||
if f
|
||||
f.flush
|
||||
Kernel.system "/usr/bin/tail -n 5 #{logfn}" unless ARGV.verbose?
|
||||
require 'cmd/--config'
|
||||
$f = f
|
||||
def Homebrew.puts(*foo); $f.puts *foo end
|
||||
f.puts
|
||||
Homebrew.dump_build_config
|
||||
class << Homebrew; undef :puts end
|
||||
else
|
||||
puts "No logs recorded :(" unless ARGV.verbose?
|
||||
end
|
||||
raise BuildError.new(self, cmd, args, $?)
|
||||
ensure
|
||||
f.close if f
|
||||
removed_ENV_variables.each do |key, value|
|
||||
ENV[key] = value
|
||||
end if removed_ENV_variables
|
||||
end
|
||||
|
||||
public
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user