improve message, suggest log on errors

This commit is contained in:
gmarik 2011-08-13 19:49:34 -05:00
parent 1e516d3249
commit aa9bd35eab

View File

@ -16,6 +16,8 @@ endf
func! s:process(bang, func_name, items) func! s:process(bang, func_name, items)
let msg = ''
redraw! redraw!
sleep 1m sleep 1m
@ -30,6 +32,7 @@ func! s:process(bang, func_name, items)
let status = call('vundle#installer#'.a:func_name, [a:bang, n]) let status = call('vundle#installer#'.a:func_name, [a:bang, n])
call s:sign(status) call s:sign(status)
redraw!
if 'updated' == status if 'updated' == status
echo n.' installed' echo n.' installed'
@ -42,6 +45,7 @@ func! s:process(bang, func_name, items)
echo 'Error processing '.n echo 'Error processing '.n
echohl None echohl None
sleep 1 sleep 1
let msg = 'With errors, press `l` to view log'
else else
throw 'whoops, unknown status:'.status throw 'whoops, unknown status:'.status
endif endif
@ -53,6 +57,7 @@ func! s:process(bang, func_name, items)
endfor endfor
redraw! redraw!
echo 'Done! '.msg
endf endf
func! s:sign(status) func! s:sign(status)
@ -104,7 +109,6 @@ func! vundle#installer#clean(bang) abort
if (a:bang || empty(names) || input('Continute ? [ y/n ]:') =~? 'y') if (a:bang || empty(names) || input('Continute ? [ y/n ]:') =~? 'y')
call s:process(a:bang, 'delete', names) call s:process(a:bang, 'delete', names)
echo 'Done!'
endif endif
endf endf