aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew_doctor.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index 0db2e78ca..462445e70 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -524,8 +524,15 @@ def __check_linked_brew f
Pathname.new(f.prefix).find do |src|
dst=HOMEBREW_PREFIX+src.relative_path_from(f.prefix)
next unless dst.symlink?
- links_found << dst unless src.directory?
- Find.prune if src.directory?
+
+ dst_points_to = dst.realpath()
+ next unless dst_points_to.to_s == src.to_s
+
+ if src.directory?
+ Find.prune
+ else
+ links_found << dst
+ end
end
return links_found