From ae829ed229395159adf6f1f17fb26518ec27fca6 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Tue, 7 Feb 2017 23:25:02 -0800 Subject: add brew where command --- Library/Homebrew/dev-cmd/where.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Library/Homebrew/dev-cmd/where.rb (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/where.rb b/Library/Homebrew/dev-cmd/where.rb new file mode 100644 index 000000000..63237301b --- /dev/null +++ b/Library/Homebrew/dev-cmd/where.rb @@ -0,0 +1,15 @@ +#: * `where` : +#: echo location of the specified to stdout + +require "formula" + +module Homebrew + module_function + + def where + raise FormulaUnspecifiedError if ARGV.named.empty? + ARGV.resolved_formulae.each do |f| + puts "#{f.path}\n" + end + end +end -- cgit v1.2.3