Merge pull request #8782 from jonchang/fix-xattr-doctor

diagnostic: fix xattr check
This commit is contained in:
Jonathan Chang 2020-09-21 01:58:12 +10:00 committed by GitHub
commit d9416d762a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -968,9 +968,9 @@ module Homebrew
return if result.status.success?
if result.stderr.include? "ImportError: No module named pkg_resources"
result = system_command "/usr/bin/python", "--version"
result = Utils.popen_read "/usr/bin/python", "--version", err: :out
if result.stdout.include? "Python 2.7"
if result.include? "Python 2.7"
<<~EOS
Your Python installation has a broken version of setuptools.
To fix, reinstall macOS or run 'sudo /usr/bin/python -m pip install -I setuptools'.