diff options
Diffstat (limited to 'Library/Homebrew/dev-cmd/bump-formula-pr.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/bump-formula-pr.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 1f60412ed..ca3f4cfe8 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -232,12 +232,12 @@ module Homebrew end replacement_pairs += formula_spec.mirrors.map do |mirror| - [/ +mirror \"#{mirror}\"\n/m, ""] + [/ +mirror \"#{Regexp.escape(mirror)}\"\n/m, ""] end replacement_pairs += if new_url_hash [ - [formula_spec.url, new_url], + [/#{Regexp.escape(formula_spec.url)}/, new_url], [old_hash, new_hash], ] else @@ -250,7 +250,7 @@ module Homebrew backup_file = File.read(formula.path) unless ARGV.dry_run? if new_mirror - replacement_pairs << [/^( +)(url \"#{new_url}\"\n)/m, "\\1\\2\\1mirror \"#{new_mirror}\"\n"] + replacement_pairs << [/^( +)(url \"#{Regexp.escape(new_url)}\"\n)/m, "\\1\\2\\1mirror \"#{new_mirror}\"\n"] end if forced_version && forced_version != "0" |
