aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-13 19:47:30 -0500
committerJack Nagel2014-09-13 19:47:30 -0500
commita607c71123ff42fe7060f8c49a12a247c13104a6 (patch)
tree5d455378e2885e35aea2963a01ae0930202a2cff /Library
parent20516ee39be4b411f72a94e05353e5745079382f (diff)
downloadbrew-a607c71123ff42fe7060f8c49a12a247c13104a6.tar.bz2
Pass the ENV hash into the BuildError constructor
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/exceptions.rb4
-rw-r--r--Library/Homebrew/formula.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index add29a2f0..a25a36f56 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -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
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 59e81ad32..67ed06661 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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?