mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		| @@ -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.', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user