Post-update hook should not run in case of an error

This commit is contained in:
Junegunn Choi
2015-10-22 13:23:35 +09:00
parent eb29cc9b47
commit fb8a5f9246
2 changed files with 23 additions and 1 deletions

View File

@@ -646,7 +646,7 @@ function! s:do(pull, force, todo)
endif
let installed = has_key(s:update.new, name)
let updated = installed ? 0 :
\ (a:pull && !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', spec.dir)))
\ (a:pull && index(s:update.errors, name) < 0 && !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', spec.dir)))
if a:force || installed || updated
execute 'cd' s:esc(spec.dir)
call append(3, '- Post-update hook for '. name .' ... ')