aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/provider/ruby
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-01-28 12:59:22 -0800
committerJustin M. Keyes <justinkz@gmail.com>2024-01-28 23:56:06 +0100
commite39b6d0c52410b59ad75312659ab278da42e42c6 (patch)
tree8bca0709d9cbe89a2a4ea3c10bc6d37011f4ebbb /runtime/lua/provider/ruby
parent50cd5ed360ee76352bdfe1a49fa5746731c0ee16 (diff)
downloadrneovim-e39b6d0c52410b59ad75312659ab278da42e42c6.tar.gz
rneovim-e39b6d0c52410b59ad75312659ab278da42e42c6.tar.bz2
rneovim-e39b6d0c52410b59ad75312659ab278da42e42c6.zip
fix(health): "attempt to concatenate nil"
Problem: If `neovim` module is not installed, python and ruby healthchecks fail: - ERROR Failed to run healthcheck for "provider.python" plugin. Exception: .../runtime/lua/provider/python/health.lua:348: attempt to concatenate local 'pyname' (a nil value) - ERROR Failed to run healthcheck for "provider.ruby" plugin. Exception: .../runtime/lua/provider/ruby/health.lua:25: attempt to index local 'host' (a nil value) Solution: Check for non-nil.
Diffstat (limited to 'runtime/lua/provider/ruby')
-rw-r--r--runtime/lua/provider/ruby/health.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/provider/ruby/health.lua b/runtime/lua/provider/ruby/health.lua
index b102cbe535..d43d7cf9b3 100644
--- a/runtime/lua/provider/ruby/health.lua
+++ b/runtime/lua/provider/ruby/health.lua
@@ -22,7 +22,7 @@ function M.check()
local ruby_detect_table = require('vim.provider.ruby').detect()
local host = ruby_detect_table[1]
- if host:find('^%s*$') then
+ if (not host) or host:find('^%s*$') then
health.warn('`neovim-ruby-host` not found.', {
'Run `gem install neovim` to ensure the neovim RubyGem is installed.',
'Run `gem environment` to ensure the gem bin directory is in $PATH.',