diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-06-03 23:48:36 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-06-04 07:46:11 +0200 |
| commit | ee2266993baf909bcada06421e3b9af0114a495c (patch) | |
| tree | 931456f32c7e17cb8204873c79c803c132097c94 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar.gz nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar.bz2 nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar.lz nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar.xz nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.tar.zst nvim-treesitter-ee2266993baf909bcada06421e3b9af0114a495c.zip | |
Fix 1359: nil check for version in health-check
| -rw-r--r-- | lua/nvim-treesitter/health.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua index e2896cd03..9eeb99147 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 |
