brew/Library/Homebrew/cmd/--prefix.rb
Max Howell dd917bc105 Use opt prefix for --prefix
Rationale: everyone thinks it points to the currently installed prefix, not the prefix of the formula that is newest and maybe not installed.

The previous behavior was unintentional and evidence proves it is not intuitive either.

I anticipate no regressions. And hope I am right!
2012-09-12 22:09:46 -04:00

10 lines
188 B
Ruby

module Homebrew extend self
def __prefix
if ARGV.named.empty?
puts HOMEBREW_PREFIX
else
puts ARGV.formulae.map{ |f| "#{HOMEBREW_PREFIX}/opt/#{f}" }
end
end
end