aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/doctor.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-23 23:28:16 -0500
committerJack Nagel2013-05-23 23:28:16 -0500
commitc08d8dce5685e1f4238e60acebb7d29ad594124b (patch)
treea2071a6e05147a1380924a7d27c37138ff2e5385 /Library/Homebrew/cmd/doctor.rb
parent9f2f3a305bec964d4e20c09830aaf60e17353d47 (diff)
downloadhomebrew-c08d8dce5685e1f4238e60acebb7d29ad594124b.tar.bz2
doctor: reorganize check_for_macgpg2
Diffstat (limited to 'Library/Homebrew/cmd/doctor.rb')
-rw-r--r--Library/Homebrew/cmd/doctor.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 315cfcc8a..a3766758f 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)