diff options
Diffstat (limited to 'Library/Homebrew/system_config.rb')
| -rw-r--r-- | Library/Homebrew/system_config.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index f89c79306..5663295c2 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -77,7 +77,14 @@ class SystemConfig end def describe_python - python = which "python" + python = begin + python_path = PATH.new(ENV["HOMEBREW_PATH"]) + .prepend(Formula["python"].opt_libexec/"bin") + which "python", python_path + rescue FormulaUnavailableError + which "python" + end + return "N/A" if python.nil? python_binary = Utils.popen_read python, "-c", "import sys; sys.stdout.write(sys.executable)" python_binary = Pathname.new(python_binary).realpath |
