mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
25 lines
419 B
Ruby
25 lines
419 B
Ruby
#: * `formula` <formula>:
|
|
#: Display the path where <formula> is located.
|
|
|
|
require "formula"
|
|
require "cli_parser"
|
|
|
|
module Homebrew
|
|
module_function
|
|
|
|
def formula_args
|
|
Homebrew::CLI::Parser.new do
|
|
switch :debug
|
|
switch :verbose
|
|
end
|
|
end
|
|
|
|
def formula
|
|
formula_args.parse
|
|
|
|
raise FormulaUnspecifiedError if ARGV.named.empty?
|
|
|
|
ARGV.resolved_formulae.each { |f| puts f.path }
|
|
end
|
|
end
|