diff options
| author | Max Howell | 2012-03-06 12:19:53 +0000 |
|---|---|---|
| committer | Max Howell | 2012-03-06 12:20:02 +0000 |
| commit | 437a93cd85cc64f5cac631c41d968b8fcde94a52 (patch) | |
| tree | 7012ef4692ecb80ecf3873105b53f06c31be174e /Library | |
| parent | d8c7ce480faff6921277ccb82dce24013e99bf00 (diff) | |
| download | homebrew-437a93cd85cc64f5cac631c41d968b8fcde94a52.tar.bz2 | |
Doctor check for `python` is Python-3
Refs #9541.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 76763208f..d87b86ec6 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -782,6 +782,17 @@ def check_for_enthought_python end end +def check_for_bad_python_symlink + return unless system "/usr/bin/which -s python" + # Indeed Python --version outputs to stderr (WTF?) + `python --version 2>&1` =~ /Python (\d+)\./ + unless $1 == "2" then <<-EOS.undent + python is symlinked to python#$1 + This will confuse build scripts and in general lead to subtle breakage. + EOS + end +end + end # end class Checks module Homebrew extend self |
