Browse Source

replace exec with system()

- closes #64
pull/118/head
gmarik 14 years ago
parent
commit
73daf4eb9f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      autoload/vundle/scripts.vim

+ 3
- 2
autoload/vundle/scripts.vim View File

@ -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


Loading…
Cancel
Save