mirror of
https://github.com/neovim/neovim
synced 2025-07-18 10:11:50 +00:00
committed by
Justin M. Keyes
parent
452112ae38
commit
c38862acea
@ -564,7 +564,10 @@ function! s:check_node() abort
|
|||||||
endif
|
endif
|
||||||
call health#report_info('Neovim node.js host: '. host)
|
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))
|
let latest_npm = s:system(split(latest_npm_cmd))
|
||||||
if s:shell_error || empty(latest_npm)
|
if s:shell_error || empty(latest_npm)
|
||||||
call health#report_error('Failed to run: '. latest_npm_cmd,
|
call health#report_error('Failed to run: '. latest_npm_cmd,
|
||||||
@ -593,7 +596,8 @@ function! s:check_node() abort
|
|||||||
call health#report_warn(
|
call health#report_warn(
|
||||||
\ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s',
|
\ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s',
|
||||||
\ current_npm, latest_npm),
|
\ 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
|
else
|
||||||
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
|
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user