Fix brew typecheck
This commit is contained in:
parent
2e6b6ab3a2
commit
2e4185a525
@ -56,7 +56,7 @@ module Utils
|
|||||||
errors["`paths` (first) parameter"] = ["`paths` was empty"] if paths.blank?
|
errors["`paths` (first) parameter"] = ["`paths` was empty"] if paths.blank?
|
||||||
|
|
||||||
Array(paths).each do |path|
|
Array(paths).each do |path|
|
||||||
str = File.binread(path) || ""
|
str = File.binread(path)
|
||||||
s = StringInreplaceExtension.new(str)
|
s = StringInreplaceExtension.new(str)
|
||||||
|
|
||||||
if before.nil? && after.nil?
|
if before.nil? && after.nil?
|
||||||
@ -75,7 +75,7 @@ module Utils
|
|||||||
|
|
||||||
# @api private
|
# @api private
|
||||||
def inreplace_pairs(path, replacement_pairs, read_only_run: false, silent: false)
|
def inreplace_pairs(path, replacement_pairs, read_only_run: false, silent: false)
|
||||||
str = File.binread(path) || ""
|
str = File.binread(path)
|
||||||
contents = StringInreplaceExtension.new(str)
|
contents = StringInreplaceExtension.new(str)
|
||||||
replacement_pairs.each do |old, new|
|
replacement_pairs.each do |old, new|
|
||||||
ohai "replace #{old.inspect} with #{new.inspect}" unless silent
|
ohai "replace #{old.inspect} with #{new.inspect}" unless silent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user