From e8c68aa7ee64aaa8363b2900ea97a97e7eb8ba4b Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Fri, 5 Jun 2015 12:16:52 +0300 Subject: provider/pythonx: Show absolute path to executable in error message. --- runtime/autoload/provider/pythonx.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/autoload/provider/pythonx.vim') diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index 669ae47a39..412c93d5a0 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -43,8 +43,9 @@ function! provider#pythonx#Detect(major_ver) abort endfunction function! s:check_interpreter(prog, major_ver, skip) abort - if !executable(a:prog) - return [0, a:prog . ' does not exist or is not executable.'] + let prog_path = exepath(a:prog) + if prog_path == '' + return [0, a:prog . ' not found in search path or not executable.'] endif if a:skip @@ -60,7 +61,7 @@ function! s:check_interpreter(prog, major_ver, skip) abort \ '''import importlib; exit(importlib.find_loader("neovim") is None)''') \ ) if v:shell_error - return [0, a:prog . ' does have not have the neovim module installed. ' + return [0, prog_path . ' does have not have the neovim module installed. ' \ . 'See ":help nvim-python".'] endif @@ -69,6 +70,6 @@ function! s:check_interpreter(prog, major_ver, skip) abort return [1, ''] endif - return [0, a:prog . ' is Python ' . prog_ver . ' and cannot provide Python ' + return [0, prog_path . ' is Python ' . prog_ver . ' and cannot provide Python ' \ . a:major_ver . '.'] endfunction -- cgit