From 7ddaaf9bb030d49aba5eb0e8d8fd7944bc6532ee Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 6 Mar 2012 12:19:53 +0000 Subject: Doctor check for `python` is Python-3 Refs Homebrew/homebrew#9541. --- Library/Homebrew/cmd/doctor.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3