2017-02-11 16:37:41 -08:00
|
|
|
#: * `formula` <formula>:
|
2017-02-25 17:37:57 -05:00
|
|
|
#: Display the path where <formula> is located.
|
2017-02-07 23:25:02 -08:00
|
|
|
|
|
|
|
require "formula"
|
2018-04-01 16:47:30 +05:30
|
|
|
require "cli_parser"
|
2017-02-07 23:25:02 -08:00
|
|
|
|
|
|
|
module Homebrew
|
|
|
|
module_function
|
|
|
|
|
2017-02-08 00:12:50 -08:00
|
|
|
def formula
|
2018-04-01 16:47:30 +05:30
|
|
|
Homebrew::CLI::Parser.parse do
|
|
|
|
switch :debug
|
|
|
|
switch :verbose
|
|
|
|
end
|
|
|
|
|
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
|