25 lines
419 B
Ruby
Raw Normal View History

2017-02-11 16:37:41 -08:00
#: * `formula` <formula>:
#: Display the path where <formula> is located.
2017-02-07 23:25:02 -08:00
require "formula"
require "cli_parser"
2017-02-07 23:25:02 -08:00
module Homebrew
module_function
def formula_args
Homebrew::CLI::Parser.new do
switch :debug
switch :verbose
end
end
def formula
formula_args.parse
2017-02-07 23:25:02 -08:00
raise FormulaUnspecifiedError if ARGV.named.empty?
2018-09-17 02:45:00 +02:00
2017-02-11 16:37:41 -08:00
ARGV.resolved_formulae.each { |f| puts f.path }
2017-02-07 23:25:02 -08:00
end
end