Skip to content

Commit

Permalink
Revert "Disable audit_result in inreplace"
Browse files Browse the repository at this point in the history
This reverts commit f31e93a.
  • Loading branch information
pkryger committed Oct 25, 2024
1 parent f31e93a commit 2225af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/test/utils/inreplace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it "raises error if there is nothing to replace" do
expect do
described_class.inreplace file.path, "d", "f"
end.not_to raise_error(Utils::Inreplace::Error)
end.to raise_error(Utils::Inreplace::Error)
end

it "raises error if there is nothing to replace in block form" do
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/inreplace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def initialize(errors)
block: T.nilable(T.proc.params(s: StringInreplaceExtension).void),
).void
}
def self.inreplace(paths, before = nil, after = nil, audit_result: false, &block)
def self.inreplace(paths, before = nil, after = nil, audit_result: true, &block)
paths = Array(paths)
after &&= after.to_s
before = before.to_s if before.is_a?(Pathname)
Expand Down

0 comments on commit 2225af5

Please sign in to comment.