aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-12-17 15:03:07 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-12-17 16:09:18 +0100
commite0054fef7d351b0f8af3a04bb22d6e6ee8bae63f (patch)
treeb67760bdd553f544c5214f3047213ad2c07528da
parent5b692124cc94c8e5edc0c767e6a71887754643cd (diff)
downloadrneovim-e0054fef7d351b0f8af3a04bb22d6e6ee8bae63f.tar.gz
rneovim-e0054fef7d351b0f8af3a04bb22d6e6ee8bae63f.tar.bz2
rneovim-e0054fef7d351b0f8af3a04bb22d6e6ee8bae63f.zip
health.vim: nodejs: skip if nodejs is too old
-rw-r--r--runtime/autoload/health/provider.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 188b67c4c1..205a23dcbd 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -506,6 +506,8 @@ function! s:check_node() abort
call health#report_info('Node.js: '. node_v)
if !s:shell_error && s:version_cmp(node_v[1:], '6.0.0') < 0
call health#report_warn('Neovim node.js host does not support '.node_v)
+ " Skip further checks, they are nonsense if nodejs is too old.
+ return
endif
if !provider#node#can_inspect()
call health#report_warn('node.js on this system does not support --inspect-brk so $NVIM_NODE_HOST_DEBUG is ignored.')
@@ -540,8 +542,8 @@ function! s:check_node() abort
let current_npm_cmd = ['node', host, '--version']
let current_npm = s:system(current_npm_cmd)
if s:shell_error
- call health#report_error('Failed to run: '. current_npm_cmd,
- \ ['Report this issue with the output of: ', current_npm_cmd])
+ call health#report_error('Failed to run: '. string(current_npm_cmd),
+ \ ['Report this issue with the output of: ', string(current_npm_cmd)])
return
endif
@@ -551,7 +553,7 @@ function! s:check_node() abort
\ current_npm, latest_npm),
\ ['Run in shell: npm update neovim'])
else
- call health#report_ok('Latest "neovim" npm is installed: '. current_npm)
+ call health#report_ok('Latest "neovim" npm package is installed: '. current_npm)
endif
endfunction