aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Catlett2014-01-13 09:10:28 -0600
committerAdam Vandenberg2014-02-11 20:27:05 -0800
commit4d3dbba644d5ed951e1a81ff23a462f8d4e6c17b (patch)
tree6a6da561353838fb1411ba56114f1f06b8761192
parent18f3b9f6d11678cf1649e72706b51c7a7b5d3cd4 (diff)
downloadbrew-4d3dbba644d5ed951e1a81ff23a462f8d4e6c17b.tar.bz2
Use HOMEBREW_PREFIX/opt to find installs instead of symlinks in bin, lib, sbin.
Closes Homebrew/homebrew#25868. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rwxr-xr-xLibrary/Contributions/cmd/brew-which.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/Library/Contributions/cmd/brew-which.rb b/Library/Contributions/cmd/brew-which.rb
index b3318ee76..fede4f888 100755
--- a/Library/Contributions/cmd/brew-which.rb
+++ b/Library/Contributions/cmd/brew-which.rb
@@ -8,13 +8,9 @@ module Homebrew extend self
real_cellar = HOMEBREW_CELLAR.realpath
- paths=%w[bin sbin lib].collect {|d| HOMEBREW_PREFIX+d}
-
- paths.each do |path|
- path.find do |path|
- next unless path.symlink? && path.resolved_path_exists?
- brew_links << Pathname.new(path.realpath)
- end
+ (HOMEBREW_PREFIX/'opt').subdirs.each do |path|
+ next unless path.symlink? && path.resolved_path_exists?
+ brew_links << Pathname.new(path.realpath)
end
brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")}