aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-05-23 23:28:16 -0500
committerJack Nagel2013-05-23 23:28:16 -0500
commit8b98e8334710f29b85dbf44b6a690b1a6a4d5935 (patch)
treef06a514321875ec820c968f356dbe1ec76b50186 /Library
parent187b9c9d593be13b137da7fb675764f57b03a8db (diff)
downloadbrew-8b98e8334710f29b85dbf44b6a690b1a6a4d5935.tar.bz2
doctor: reorganize check_for_macgpg2
Diffstat (limited to 'Library')
-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)