formula: fix inreplace errors not being printed

This commit is contained in:
Bo Anderson 2022-10-07 21:00:46 +01:00
parent 3a57d0904b
commit 60b0c337df
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -2324,7 +2324,8 @@ class Formula
# @api public # @api public
def inreplace(paths, before = nil, after = nil, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter def inreplace(paths, before = nil, after = nil, audit_result = true) # rubocop:disable Style/OptionalBooleanParameter
super(paths, before, after, audit_result) super(paths, before, after, audit_result)
rescue Utils::Inreplace::Error rescue Utils::Inreplace::Error => e
onoe e.to_s
raise BuildError.new(self, "inreplace", paths, {}) raise BuildError.new(self, "inreplace", paths, {})
end end