2016-04-17 09:19:35 +02:00
|
|
|
#: * `--prefix`:
|
2018-09-06 16:58:17 -07:00
|
|
|
#: Display Homebrew's install path. *Default:* `/usr/local` on macOS and `/home/linuxbrew/.linuxbrew` on Linux
|
2016-04-17 09:19:35 +02:00
|
|
|
#:
|
|
|
|
#: * `--prefix` <formula>:
|
|
|
|
#: Display the location in the cellar where <formula> is or would be installed.
|
|
|
|
|
2014-06-18 22:41:47 -05:00
|
|
|
module Homebrew
|
2016-09-26 01:44:51 +02:00
|
|
|
module_function
|
|
|
|
|
2010-09-11 20:22:54 +01:00
|
|
|
def __prefix
|
|
|
|
if ARGV.named.empty?
|
|
|
|
puts HOMEBREW_PREFIX
|
|
|
|
else
|
2017-02-12 16:17:56 +00:00
|
|
|
puts ARGV.resolved_formulae.map { |f|
|
|
|
|
f.opt_prefix.exist? ? f.opt_prefix : f.installed_prefix
|
|
|
|
}
|
2010-09-11 20:22:54 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|