From a2d9271bda21ebdc30cb9ab9f40e79b793a2a6f8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 2 Nov 2013 22:52:24 -0500 Subject: [PATCH] Remove intermediate exception in Formula#system Now that ErrorDuringExecution is only raised in one place, we can just raise the BuildError directly instead. --- Library/Homebrew/formula.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index a760e7fc26..b8cf10e005 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -609,11 +609,9 @@ class Formula f.puts require 'cmd/--config' Homebrew.write_build_config(f) - raise ErrorDuringExecution + raise BuildError.new(self, cmd, args, $?) end end - rescue ErrorDuringExecution - raise BuildError.new(self, cmd, args, $?) ensure rd.close if rd and not rd.closed? ENV.update(removed_ENV_variables) if removed_ENV_variables