aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/where.rb15
1 files changed, 15 insertions, 0 deletions
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` <formulae>:
+#: echo location of the specified <formulae> 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