aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/health/provider.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 55fa1ff65e..7ab06c3820 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -383,8 +383,10 @@ function! s:check_python(version) abort
endif
" Check if $VIRTUAL_ENV is valid.
- if exists('$VIRTUAL_ENV')
- if !empty(pyname) && $VIRTUAL_ENV !=# matchstr(exepath(pyname), '^\V'.$VIRTUAL_ENV)
+ if exists('$VIRTUAL_ENV') && !empty(python_bin)
+ if $VIRTUAL_ENV ==# matchstr(python_bin, '^\V'.$VIRTUAL_ENV)
+ call health#report_info('$VIRTUAL_ENV matches executable')
+ else
call health#report_warn(
\ '$VIRTUAL_ENV exists but appears to be inactive. '
\ . 'This could lead to unexpected results.',