mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
452112ae38
commit
c38862acea
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user