
Until a point in time when the Cask/Homebrew codebases are harmonised a little more it probably makes sense to refuse to `cat` Casks. Right now the Homebrew codebase is only minimally aware of what a Cask is. Fixes Homebrew/homebrew#45300. Fixes Homebrew/homebrew#44630. Closes Homebrew/homebrew#45302. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
14 lines
461 B
Ruby
14 lines
461 B
Ruby
module Homebrew
|
|
def cat
|
|
# 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
|
|
|
|
cd HOMEBREW_REPOSITORY
|
|
exec "cat", formulae.first.path, *ARGV.options_only
|
|
end
|
|
end
|