brew-config: show realpath for pyenv and rbenv
Closes Homebrew/homebrew#35819. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
c6dee041eb
commit
6d786e7dbb
@ -74,11 +74,21 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def describe_python
|
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
|
end
|
||||||
|
|
||||||
def describe_ruby
|
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
|
end
|
||||||
|
|
||||||
def hardware
|
def hardware
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user