diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/config.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb index 7d4d8cfc3..4caa3afec 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 |
