aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2017-01-08 13:32:55 +0100
committerDaniel Hahler <git@thequod.de>2017-01-08 23:26:46 +0100
commit5ce50504f99124e9363804dd853a85d07e9c9d2f (patch)
tree327abe13818209f48abcdbe94759ef11b9af8867
parent0583ca63a52e2dea8945475e726d1c7d55da2ec7 (diff)
downloadrneovim-5ce50504f99124e9363804dd853a85d07e9c9d2f.tar.gz
rneovim-5ce50504f99124e9363804dd853a85d07e9c9d2f.tar.bz2
rneovim-5ce50504f99124e9363804dd853a85d07e9c9d2f.zip
healthcheck: python: include nvim path for unknown/outdated version
This helps to identify where the `neovim` module is coming from, e.g. - INFO: python3-neovim version: 0.1.10 (outdated; from ~/Vcs/neovim-python-client/neovim) - WARNING: Latest python3-neovim is NOT installed: 0.1.12
-rw-r--r--runtime/autoload/health/provider.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 1d181f9ac4..b1a3711390 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -185,10 +185,11 @@ function! s:version_info(python) abort
endfor
endif
- let version_status = 'unknown'
+ let nvim_path_base = fnamemodify(nvim_path, ':~:h')
+ let version_status = 'unknown; '.nvim_path_base
if !s:is_bad_response(nvim_version) && !s:is_bad_response(pypi_version)
if s:version_cmp(nvim_version, pypi_version) == -1
- let version_status = 'outdated'
+ let version_status = 'outdated; from '.nvim_path_base
else
let version_status = 'up to date'
endif
@@ -371,7 +372,11 @@ function! s:check_python(version) abort
endif
call health#report_info('Python'.a:version.' version: ' . pyversion)
- call health#report_info(printf('%s-neovim version: %s', python_bin_name, current))
+ if s:is_bad_response(status)
+ call health#report_info(printf('%s-neovim version: %s (%s)', python_bin_name, current, status))
+ else
+ call health#report_info(printf('%s-neovim version: %s', python_bin_name, current))
+ endif
if s:is_bad_response(current)
call health#report_error(