mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #16790 from cho-m/pypi-ignore-test-resources
utils/pypi: ignore test resources when counting matches
This commit is contained in:
commit
c3d18113c3
@ -374,7 +374,7 @@ module PyPI
|
|||||||
|
|
||||||
ohai "Updating resource blocks" unless silent
|
ohai "Updating resource blocks" unless silent
|
||||||
Utils::Inreplace.inreplace formula.path do |s|
|
Utils::Inreplace.inreplace formula.path do |s|
|
||||||
if s.inreplace_string.scan(inreplace_regex).length > 1
|
if T.must(s.inreplace_string.split(/^ test do\b/, 2).first).scan(inreplace_regex).length > 1
|
||||||
odie "Unable to update resource blocks for \"#{formula.name}\" automatically. Please update them manually."
|
odie "Unable to update resource blocks for \"#{formula.name}\" automatically. Please update them manually."
|
||||||
end
|
end
|
||||||
s.sub! inreplace_regex, new_resource_blocks
|
s.sub! inreplace_regex, new_resource_blocks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user