diff --git a/Library/Homebrew/cmd/--cellar.rb b/Library/Homebrew/cmd/--cellar.rb index f35847ead6..94547416c1 100644 --- a/Library/Homebrew/cmd/--cellar.rb +++ b/Library/Homebrew/cmd/--cellar.rb @@ -1,15 +1,25 @@ -#: * `--cellar`: -#: Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if -#: that directory doesn't exist, `$(brew --repository)/Cellar`. -#: -#: * `--cellar` : -#: Display the location in the cellar where would be installed, -#: without any sort of versioned directory as the last path. +require "cli_parser" module Homebrew module_function + def __cellar_args + Homebrew::CLI::Parser.new do + usage_banner <<~EOS + `--cache` [] + + Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if + that directory doesn't exist, `$(brew --repository)/Cellar`. + + If is provided, display the location in the cellar where + would be installed, without any sort of versioned directory as the last path. + EOS + end + end + def __cellar + __cellar_args.parse + if ARGV.named.empty? puts HOMEBREW_CELLAR else