diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 315cfcc8a9..a3766758f9 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -82,15 +82,20 @@ end # Installing MacGPG2 interferes with Homebrew in a big way # http://sourceforge.net/projects/macgpg2/files/ def check_for_macgpg2 - if %w{/Applications/start-gpg-agent.app - /Library/Receipts/libiconv1.pkg - /usr/local/MacGPG2}.any? { |f| File.exist? f } - <<-EOS.undent + return if File.exist? '/usr/local/MacGPG2/share/gnupg/VERSION' + + suspects = %w{ + /Applications/start-gpg-agent.app + /Library/Receipts/libiconv1.pkg + /usr/local/MacGPG2 + } + + if suspects.any? { |f| File.exist? f } then <<-EOS.undent You may have installed MacGPG2 via the package installer. Several other checks in this script will turn up problems, such as stray dylibs in /usr/local and permissions issues with share and man in /usr/local/. EOS - end unless File.exist? '/usr/local/MacGPG2/share/gnupg/VERSION' + end end def __check_stray_files(pattern, white_list, message)