diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb index 7d4d8cfc32..4caa3afec2 100644 --- a/Library/Homebrew/cmd/config.rb +++ b/Library/Homebrew/cmd/config.rb @@ -74,11 +74,21 @@ module Homebrew end def describe_python - describe_path(which 'python') + python = which 'python' + if %r{/shims/python$} =~ python && which('pyenv') + "#{python} => #{Pathname.new(`pyenv which python`.strip).realpath}" rescue describe_path(python) + else + describe_path(python) + end end def describe_ruby - describe_path(which 'ruby') + ruby = which 'ruby' + if %r{/shims/ruby$} =~ ruby && which('rbenv') + "#{ruby} => #{Pathname.new(`rbenv which ruby`.strip).realpath}" rescue describe_path(ruby) + else + describe_path(ruby) + end end def hardware