Permalink
Browse files

Made vam#vcs#Checkout throw in case checkout failed. Was broken previ…

…osly
  • Loading branch information...
1 parent cb87b6b commit b9aadb9ac4730fbe2df18695b740cdacfc24f489 @ZyX-I ZyX-I committed Aug 25, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 autoload/vam/vcs.vim
@@ -230,15 +230,17 @@ endf
fun! vam#vcs#Checkout(targetDir, repository)
if has_key(s:c.scms, a:repository.type)
let c=s:c.scms[a:repository.type].clone
- call call(c[0], get(c, 1, [])+[a:repository, a:targetDir], get(c, 2, {}))
- return 1
+ if call(c[0], get(c, 1, [])+[a:repository, a:targetDir], get(c, 2, {}))
+ throw "Failed to checkout addon to ".a:targetDir."."
+ endif
else
" Keep old behavior: no throw for unknown repository type
return
endif
if !isdirectory(a:targetDir)
- throw "Failure. Plugin directory ".a:targetDir." should have been created but does not exist !"
+ throw "Failure. Plugin directory ".a:targetDir." should have been created but does not exist."
endif
+ return 1
endf
" vim: et ts=8 sts=2 sw=2

0 comments on commit b9aadb9

Please sign in to comment.