2020-07-31 15:07:17 +02:00

27 lines
417 B
Ruby

# frozen_string_literal: true
require "formula"
require "cli/parser"
module Homebrew
module_function
def formula_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`formula` <formula>
Display the path where <formula> is located.
EOS
min_named :formula
end
end
def formula
args = formula_args.parse
args.formulae_paths.each(&method(:puts))
end
end