diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index e3ccee5..c2685df 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -223,11 +223,7 @@ func! s:sync(bang, bundle) abort let initial_sha = '' endif - let out = s:system(cmd) - call s:log('') - call s:log('Bundle '.a:bundle.name_spec) - call s:log('$ '.cmd) - call s:log('> '.out) + call s:run_and_log(a:bundle, cmd) if 0 != v:shell_error return 'error' @@ -247,6 +243,15 @@ func! s:sync(bang, bundle) abort return 'updated' endf +func! s:run_and_log(bundle, cmd) + let out = s:system(a:cmd) + + call s:log('') + call s:log('Bundle '.a:bundle.name_spec) + call s:log('$ '.a:cmd) + call s:log('> '.out) +endf + func! g:shellesc(cmd) abort if (has('win32') || has('win64')) if &shellxquote != '(' " workaround for patch #445