diff --git a/Library/Homebrew/cmd/cat.rb b/Library/Homebrew/cmd/cat.rb index f42fbc0377..b42e54a57a 100644 --- a/Library/Homebrew/cmd/cat.rb +++ b/Library/Homebrew/cmd/cat.rb @@ -3,9 +3,11 @@ module Homebrew # do not "fix" this to support multiple arguments, the output would be # unparsable, if the user wants to cat multiple formula they can call # brew cat multiple times. + formulae = ARGV.formulae + raise FormulaUnspecifiedError if formulae.empty? + raise "`brew cat` doesn't support multiple arguments" if formulae.size > 1 - raise FormulaUnspecifiedError if ARGV.named.empty? cd HOMEBREW_REPOSITORY - exec "cat", ARGV.formulae.first.path, *ARGV.options_only + exec "cat", formulae.first.path, *ARGV.options_only end end