From b82be5c8b0d3482da165d6ee8bbd0ddfce547695 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 20 Oct 2010 20:05:44 -0700 Subject: [PATCH] brew-doctor - fix keg-only check --- Library/Homebrew/brew_doctor.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index 0db2e78ca2..462445e704 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