bump-formula-pr: improve bad argument handling.
This commit is contained in:
parent
efc02899c8
commit
33cf882e34
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user