bump-formula-pr: improve bad argument handling.

This commit is contained in:
Mike McQuaid 2018-05-31 19:53:12 +01:00
parent efc02899c8
commit 33cf882e34

View File

@ -339,6 +339,9 @@ module Homebrew
unless Homebrew.args.quiet?
ohai "replace #{old.inspect} with #{new.inspect}"
end
unless old
raise "No old value for new value #{new}! Did you pass the wrong arguments?"
end
contents.gsub!(old, new)
end
unless contents.errors.empty?
@ -352,6 +355,9 @@ module Homebrew
unless Homebrew.args.quiet?
ohai "replace #{old.inspect} with #{new.inspect}"
end
unless old
raise "No old value for new value #{new}! Did you pass the wrong arguments?"
end
s.gsub!(old, new)
end
end