formula_installer: handle post_install exceptions.

Warn users and point them to `brew postinstall` (which can provide a
backtrace).

Closes Homebrew/homebrew#21887.
This commit is contained in:
Mike McQuaid 2013-09-01 13:57:24 +01:00
parent 626b56f9f6
commit f870d605fa

View File

@ -118,7 +118,11 @@ class FormulaInstaller
clean
end
f.post_install
begin
f.post_install
rescue
opoo "#{f.name} post_install failed. Rerun with `brew postinstall #{f.name}`."
end
opoo "Nothing was installed to #{f.prefix}" unless f.installed?
end