diff options
Diffstat (limited to 'Library/Homebrew/utils/inreplace.rb')
| -rw-r--r-- | Library/Homebrew/utils/inreplace.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 149994223..9978b02fe 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -28,12 +28,12 @@ module Utils s.gsub!(before, after, audit_result) end - errors[path] = s.errors if s.errors.any? + errors[path] = s.errors unless s.errors.empty? Pathname(path).atomic_write(s) end - raise InreplaceError.new(errors) if errors.any? + raise InreplaceError.new(errors) unless errors.empty? end module_function :inreplace end |
