mirror of
https://github.com/gosticks/brew.git
synced 2026-10-04 22:46:55 +00:00
formula: don't catch errors in the Formula.each yield
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user