diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index ba84cd3..324c281 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -112,7 +112,7 @@ func! s:fetch_scripts(to) let l:vim_scripts_json = 'http://vim-scripts.org/api/scripts.json' if executable("curl") - silent exec '!curl --fail -s -o '.shellescape(a:to).' '.l:vim_scripts_json + let cmd = 'curl --fail -s -o '.shellescape(a:to).' '.l:vim_scripts_json elseif executable("wget") let temp = shellescape(tempname()) let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.shellescape(a:to) @@ -120,12 +120,13 @@ func! s:fetch_scripts(to) let cmd = substitute(cmd, 'mv -f ', 'mv /Y ') " change force flag let cmd = '"'.cmd.'"' " enclose in quotes so && joined cmds work end - silent exec '!'.cmd else echoerr 'Error curl or wget is not available!' return 1 endif + call system(cmd) + if (0 != v:shell_error) echoerr 'Error fetching scripts!' return v:shell_error