mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Disable audit_result in inreplace
This is to allow migration of existing users of @@HOMEBREW_PREFIX@@ tag in external patches. Once the automatic replacement of the tag is in stable branch and existing users are fixed (inreplace calls removed), this commit can be reverted.
This commit is contained in:
parent
ff03947ba0
commit
f31e93a73a
@ -25,7 +25,7 @@ RSpec.describe Utils::Inreplace do
|
||||
it "raises error if there is nothing to replace" do
|
||||
expect do
|
||||
described_class.inreplace file.path, "d", "f"
|
||||
end.to raise_error(Utils::Inreplace::Error)
|
||||
end.not_to raise_error(Utils::Inreplace::Error)
|
||||
end
|
||||
|
||||
it "raises error if there is nothing to replace in block form" do
|
||||
|
@ -50,7 +50,7 @@ module Utils
|
||||
block: T.nilable(T.proc.params(s: StringInreplaceExtension).void),
|
||||
).void
|
||||
}
|
||||
def self.inreplace(paths, before = nil, after = nil, audit_result: true, &block)
|
||||
def self.inreplace(paths, before = nil, after = nil, audit_result: false, &block)
|
||||
paths = Array(paths)
|
||||
after &&= after.to_s
|
||||
before = before.to_s if before.is_a?(Pathname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user