mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 15:42:52 +00:00
Fix / improve report messages (#12396)
This commit is contained in:
@@ -537,8 +537,8 @@ function! s:check_virtualenv() abort
|
|||||||
call add(errors, 'no Python executables found in the virtualenv '.bin_dir.' directory.')
|
call add(errors, 'no Python executables found in the virtualenv '.bin_dir.' directory.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let msg = '$VIRTUAL_ENV is set to: '.$VIRTUAL_ENV
|
||||||
if len(errors)
|
if len(errors)
|
||||||
let msg = '$VIRTUAL_ENV is set to: '.$VIRTUAL_ENV
|
|
||||||
if len(venv_bins)
|
if len(venv_bins)
|
||||||
let msg .= "\nAnd its ".bin_dir.' directory contains: '
|
let msg .= "\nAnd its ".bin_dir.' directory contains: '
|
||||||
\.join(map(venv_bins, "fnamemodify(v:val, ':t')"), ', ')
|
\.join(map(venv_bins, "fnamemodify(v:val, ':t')"), ', ')
|
||||||
@@ -551,7 +551,10 @@ function! s:check_virtualenv() abort
|
|||||||
let msg .= "\nSo invoking Python may lead to unexpected results."
|
let msg .= "\nSo invoking Python may lead to unexpected results."
|
||||||
call health#report_warn(msg, keys(hints))
|
call health#report_warn(msg, keys(hints))
|
||||||
else
|
else
|
||||||
call health#report_ok('$VIRTUAL_ENV provides :python, :python3, et al.')
|
call health#report_info(msg)
|
||||||
|
call health#report_info('Python version: '
|
||||||
|
\.system('python -c "import platform, sys; sys.stdout.write(platform.python_version())"'))
|
||||||
|
call health#report_ok('$VIRTUAL_ENV provides :!python.')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user