--prefix: use opt_prefix when available.

Fixes #1952.
This commit is contained in:
Mike McQuaid 2017-02-12 16:17:56 +00:00
parent fdea0b2f3a
commit e07a587f42

View File

@ -11,7 +11,9 @@ module Homebrew
if ARGV.named.empty?
puts HOMEBREW_PREFIX
else
puts ARGV.resolved_formulae.map(&:installed_prefix)
puts ARGV.resolved_formulae.map { |f|
f.opt_prefix.exist? ? f.opt_prefix : f.installed_prefix
}
end
end
end