bottle: fix inreplace string

This commit is contained in:
Dawid Dziurla 2020-07-27 17:23:08 +02:00 committed by GitHub
parent 97cf1750f3
commit a8e524d334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -484,7 +484,7 @@ module Homebrew
update_or_add = "update" update_or_add = "update"
if args.keep_old? if args.keep_old?
mismatches = [] mismatches = []
bottle_block_contents = s[/ bottle do(.+?)end\n/m, 1] bottle_block_contents = s.inreplace_string[/ bottle do(.+?)end\n/m, 1]
bottle_block_contents.lines.each do |line| bottle_block_contents.lines.each do |line|
line = line.strip line = line.strip
next if line.empty? next if line.empty?