From 5ce50504f99124e9363804dd853a85d07e9c9d2f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 8 Jan 2017 13:32:55 +0100 Subject: 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 --- runtime/autoload/health/provider.vim | 11 ++++++++--- 1 file 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( -- cgit