diff options
| author | Chad Catlett | 2014-01-13 09:10:28 -0600 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-11 20:27:05 -0800 |
| commit | 4d3dbba644d5ed951e1a81ff23a462f8d4e6c17b (patch) | |
| tree | 6a6da561353838fb1411ba56114f1f06b8761192 | |
| parent | 18f3b9f6d11678cf1649e72706b51c7a7b5d3cd4 (diff) | |
| download | brew-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-x | Library/Contributions/cmd/brew-which.rb | 10 |
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?("../")} |
