formula: don't catch errors in the Formula.each yield

This commit is contained in:
Bo Anderson
2020-07-30 17:09:07 +01:00
parent 8d97029b03
commit 71f9ec79c7
+8 -6
View File
@@ -1461,12 +1461,14 @@ class Formula
# @private
def self.each
files.each do |file|
yield Formulary.factory(file)
rescue => e
# Don't let one broken formula break commands. But do complain.
onoe "Failed to import: #{file}"
puts e
next
yield begin
Formulary.factory(file)
rescue FormulaUnavailableError => e
# Don't let one broken formula break commands. But do complain.
onoe "Failed to import: #{file}"
puts e
next
end
end
end