Merge pull request #13981 from Bo98/inreplace-fix

This commit is contained in:
Carlo Cabrera 2022-10-08 10:41:26 +08:00 committed by GitHub
commit fb52a12144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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