Skip to content
Snippets Groups Projects
Commit 6d786e7d authored by Xu Cheng's avatar Xu Cheng Committed by Mike McQuaid
Browse files

brew-config: show realpath for pyenv and rbenv


Closes Homebrew/homebrew#35819.

Signed-off-by: default avatarMike McQuaid <mike@mikemcquaid.com>
parent c6dee041
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment