summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-06-03 23:48:36 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2021-06-04 07:46:11 +0200
commitee2266993baf909bcada06421e3b9af0114a495c (patch)
tree931456f32c7e17cb8204873c79c803c132097c94 /lua/nvim-treesitter
parent99ea1fc22af7c5463c063a62581079d6fcd0490d (diff)
Fix 1359: nil check for version in health-check
Diffstat (limited to 'lua/nvim-treesitter')
-rw-r--r--lua/nvim-treesitter/health.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua
index e2896cd0..9eeb9914 100644
--- a/lua/nvim-treesitter/health.lua
+++ b/lua/nvim-treesitter/health.lua
@@ -26,7 +26,10 @@ local function install_health()
local result = handle:read("*a")
handle:close()
local version = vim.split(result,'\n')[1]:match('[^tree%psitter].*')
- health_ok('`tree-sitter` found '..version..' (parser generator, only needed for :TSInstallFromGrammar)')
+ health_ok(
+ "`tree-sitter` found " ..
+ (version or "(unknown version)") .. " (parser generator, only needed for :TSInstallFromGrammar)"
+ )
end
if fn.executable('node') == 0 then