diff options
author | Marco Hinz <mh.codebro+github@gmail.com> | 2018-08-09 00:47:35 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-08-09 00:47:35 +0200 |
commit | d58139877990ed164c0be05569ea97a825a43117 (patch) | |
tree | 0197211978fe6a61206ed58b338c72658e3922a2 /src/nvim/lua/vim.lua | |
parent | c1187d4af013ab1c96a396126b5c0e3cf37625d6 (diff) | |
download | rneovim-d58139877990ed164c0be05569ea97a825a43117.tar.gz rneovim-d58139877990ed164c0be05569ea97a825a43117.tar.bz2 rneovim-d58139877990ed164c0be05569ea97a825a43117.zip |
ruby: detect rbenv shims for other versions (#8733)
When rbenv is used for managing Ruby installations, just checking for an
executable called "neovim-ruby-host" is not enough. It has to be run as well.
If it does not return 0, then neovim-ruby-host is merely a shim for another Ruby
installation.
$ rbenv versions
2.5.0
* 2.5.1 (set by /Users/mhi/.rbenv/version)
$ rbenv whence neovim-ruby-host
2.5.0
$ which neovim-ruby-host
/Users/mhi/.rbenv/shims/neovim-ruby-host
$ neovim-ruby-host
rbenv: neovim-ruby-host: command not found
The `neovim-ruby-host' command exists in these Ruby versions:
2.5.0
$ echo $?
127
Additionally, the detection logic was moved from provider#ruby#Detect() to
s:detect(), because the former is run in the sandbox which forbids calling
system().
Diffstat (limited to 'src/nvim/lua/vim.lua')
0 files changed, 0 insertions, 0 deletions