diff options
author | Ivan Georgiev <ivan_georgiew@yahoo.com> | 2024-04-15 19:23:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 09:23:22 -0700 |
commit | 603f3b36a4d543bc539a5abad8ac93a2595e3995 (patch) | |
tree | 2c1616ca1bf584c585fdca129c992ffce6215680 | |
parent | 533e01a75b71e93686e7bc9c79fe0172ca876d91 (diff) | |
download | rneovim-603f3b36a4d543bc539a5abad8ac93a2595e3995.tar.gz rneovim-603f3b36a4d543bc539a5abad8ac93a2595e3995.tar.bz2 rneovim-603f3b36a4d543bc539a5abad8ac93a2595e3995.zip |
fix(checkhealth): error in node.js check #28348
Problem:
:checkhealth node.js check fails:
ERROR Failed to run healthcheck for "provider.node" plugin ...
node/health.lua:98: attempt to call local 'message' (a string value)
`message` is called as a function, when it is actually a string.
Solution:
Pass `message` to `warn()` as an argument.
Fix #28346
-rw-r--r-- | runtime/lua/provider/node/health.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/lua/provider/node/health.lua b/runtime/lua/provider/node/health.lua index b4dca2f482..471c625388 100644 --- a/runtime/lua/provider/node/health.lua +++ b/runtime/lua/provider/node/health.lua @@ -92,14 +92,15 @@ function M.check() if latest_npm ~= 'unable to parse' and vim.version.lt(current_npm, latest_npm) then local message = 'Package "neovim" is out-of-date. Installed: ' - .. current_npm - .. ' latest: ' - .. latest_npm - health.warn(message({ + .. current_npm:gsub('%\n$', '') + .. ', latest: ' + .. latest_npm:gsub('%\n$', '') + + health.warn(message, { 'Run in shell: npm install -g neovim', 'Run in shell (if you use yarn): yarn global add neovim', 'Run in shell (if you use pnpm): pnpm install -g neovim', - })) + }) else health.ok('Latest "neovim" npm/yarn/pnpm package is installed: ' .. current_npm) end |