Skip to content
Snippets Groups Projects
Commit 08059680 authored by Jonathan Chang's avatar Jonathan Chang
Browse files

diagnostic: fix xattr check

Python emits the version on either stderr or stdout based on major
version, so just to be safe let's use popen_read and combine the
output streams.
parent f6cd7b72
No related branches found
No related tags found
No related merge requests found
......@@ -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'.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment