Better error message when git executable is not found

Related: #392, #52
This commit is contained in:
Junegunn Choi 2016-01-28 13:35:50 +09:00
parent c88ab60007
commit 799e20a682

View file

@ -115,7 +115,7 @@ endfunction
function! s:define_commands()
command! -nargs=+ -bar Plug call s:add(<args>)
if !executable('git')
return s:err('`git` executable not found. vim-plug requires git.')
return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.')
endif
command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(<bang>0, [<f-args>])
command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(<bang>0, [<f-args>])