Remove intermediate exception in Formula#system

Now that ErrorDuringExecution is only raised in one place, we can just
raise the BuildError directly instead.
This commit is contained in:
Jack Nagel 2013-11-02 22:52:24 -05:00
parent aafae73cf9
commit a2d9271bda

View File

@ -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