Pass the ENV hash into the BuildError constructor
This commit is contained in:
parent
20516ee39b
commit
a607c71123
@ -147,9 +147,9 @@ end
|
||||
class BuildError < Homebrew::InstallationError
|
||||
attr_reader :command, :env
|
||||
|
||||
def initialize formula, cmd, args
|
||||
def initialize(formula, cmd, args, env)
|
||||
@command = cmd
|
||||
@env = ENV.to_hash
|
||||
@env = env
|
||||
args = args.map{ |arg| arg.to_s.gsub " ", "\\ " }.join(" ")
|
||||
super formula, "Failed executing: #{command} #{args}"
|
||||
end
|
||||
|
||||
@ -545,7 +545,7 @@ class Formula
|
||||
log.puts
|
||||
require 'cmd/config'
|
||||
Homebrew.dump_build_config(log)
|
||||
raise BuildError.new(self, cmd, args)
|
||||
raise BuildError.new(self, cmd, args, ENV.to_hash)
|
||||
end
|
||||
ensure
|
||||
log.close unless log.closed?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user