Skip to content

Commit

Permalink
Show error in installer if helptags fails
Browse files Browse the repository at this point in the history
Failures in :helptags commands for individual bundles were logged but
the error were not propagated to the installer.
  • Loading branch information
jdevera committed Mar 16, 2013
1 parent 14891db commit 3dcb0c3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions autoload/vundle/installer.vim
Expand Up @@ -106,7 +106,10 @@ func! vundle#installer#install(bang, name) abort
endf endf


func! vundle#installer#docs() abort func! vundle#installer#docs() abort
call vundle#installer#helptags(g:bundles) let error_count = vundle#installer#helptags(g:bundles)
if error_count > 0
return 'error'
endif
return 'helptags' return 'helptags'
endf endf


Expand All @@ -117,11 +120,12 @@ func! vundle#installer#helptags(bundles) abort
call s:log('') call s:log('')
call s:log('Helptags:') call s:log('Helptags:')


call map(copy(help_dirs), 's:helptags(v:val)') let statuses = map(copy(help_dirs), 's:helptags(v:val)')
let errors = filter(statuses, 'v:val == 0')


call s:log('Helptags: '.len(help_dirs).' bundles processed') call s:log('Helptags: '.len(help_dirs).' bundles processed')


return help_dirs return len(errors)
endf endf


func! vundle#installer#list(bang) abort func! vundle#installer#list(bang) abort
Expand Down Expand Up @@ -201,7 +205,9 @@ func! s:helptags(rtp) abort
execute 'helptags ' . doc_path execute 'helptags ' . doc_path
catch catch
call s:log("> Error running :helptags ".doc_path) call s:log("> Error running :helptags ".doc_path)
return 0
endtry endtry
return 1
endf endf


func! s:sync(bang, bundle) abort func! s:sync(bang, bundle) abort
Expand Down

0 comments on commit 3dcb0c3

Please sign in to comment.