Skip to content
Snippets Groups Projects
Unverified Commit acd5e583 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #8143 from Bo98/formula-each

formula: don't catch errors in the Formula.each yield
parents a7276adc 71f9ec79
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment