bump-revision: raise an error when no formula

This commit is contained in:
Thierry Moisan 2019-05-17 20:50:15 -04:00
parent e098c37dc3
commit 816fdd0f5a
No known key found for this signature in database
GPG Key ID: A9A4CB593D38CDD0

View File

@ -33,6 +33,7 @@ module Homebrew
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]
raise FormulaUnspecifiedError if ARGV.formulae.empty?
raise "Multiple formulae given, only one is allowed." if ARGV.formulae.length > 1
formula = ARGV.formulae.first