fix(health): broken ruby detect #28804

This commit is contained in:
MoonFruit 2024-05-17 18:25:28 +08:00 committed by GitHub
parent 878dcf1980
commit 10f9173519
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,8 +19,7 @@ function M.check()
end end
health.info('Ruby: ' .. health.system({ 'ruby', '-v' })) health.info('Ruby: ' .. health.system({ 'ruby', '-v' }))
local ruby_detect_table = vim.provider.ruby.detect() local host, _ = vim.provider.ruby.detect()
local host = ruby_detect_table[1]
if (not host) or host:find('^%s*$') then if (not host) or host:find('^%s*$') then
health.warn('`neovim-ruby-host` not found.', { health.warn('`neovim-ruby-host` not found.', {
'Run `gem install neovim` to ensure the neovim RubyGem is installed.', 'Run `gem install neovim` to ensure the neovim RubyGem is installed.',