Check for $! before installing

If an exception is thrown while parsing the formula file before the install.rb at_exit then it will be in $!. Marshal it back to the parent brew process.
This commit is contained in:
Max Howell 2009-11-12 01:34:48 +00:00
parent 00e227ac46
commit 55f7b826d9

View File

@ -25,6 +25,8 @@ end
# rb file has to be the running script to allow it to use __END__ and DATA # rb file has to be the running script to allow it to use __END__ and DATA
at_exit do at_exit do
begin begin
raise $! if $! # an exception was already thrown when parsing the formula
require 'extend/ENV' require 'extend/ENV'
require 'fileutils' require 'fileutils'
require 'hardware' require 'hardware'