aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/health/provider.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 29bbee4888..87d82150b6 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -564,7 +564,10 @@ function! s:check_node() abort
endif
call health#report_info('Neovim node.js host: '. host)
- let latest_npm_cmd = has('win32') ? 'cmd /c npm info neovim --json' : 'npm info neovim --json'
+ let manager = executable('npm') ? 'npm' : 'yarn'
+ let latest_npm_cmd = has('win32') ?
+ \ 'cmd /c '. manager .' info neovim --json' :
+ \ manager .' info neovim --json'
let latest_npm = s:system(split(latest_npm_cmd))
if s:shell_error || empty(latest_npm)
call health#report_error('Failed to run: '. latest_npm_cmd,
@@ -593,7 +596,8 @@ function! s:check_node() abort
call health#report_warn(
\ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s',
\ current_npm, latest_npm),
- \ ['Run in shell: npm install -g neovim'])
+ \ ['Run in shell: npm install -g neovim',
+ \ 'Run in shell (if you use yarn): yarn global add neovim'])
else
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
endif