diff --git a/plug.vim b/plug.vim index 4a6bad4..4905fb7 100644 --- a/plug.vim +++ b/plug.vim @@ -587,7 +587,7 @@ function! s:do(pull, force, todo) 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))) - if a:force || installed || updated + if a:force || installed || updated execute 'cd' s:esc(spec.dir) call append(3, '- Post-update hook for '. name .' ... ') let type = type(spec.do) diff --git a/test/workflow.vader b/test/workflow.vader index ac9fa93..b200ef7 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -627,7 +627,8 @@ Execute (Single uninstalled executable): call plug#begin() Plug 'junegunn/vim-easy-align', { 'needs': 'does-not-exist' } call plug#end() - PlugInstall! + PlugInstall + AssertExpect 'Please install does-not-exist first.', 0 q Assert !isdirectory(g:plugs['vim-easy-align'].dir), \ 'vim-easy-align should not exist' @@ -636,7 +637,8 @@ Execute (Multiple uninstalled executables): call plug#begin() Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'also-non-existent'] } call plug#end() - PlugInstall! + PlugInstall + AssertExpect 'Please install does-not-exist, also-non-existent first.', 0 q Assert !isdirectory(g:plugs['vim-easy-align'].dir), \ 'vim-easy-align should not exist' @@ -645,7 +647,8 @@ Execute (Multiple uninstalled/installed executables): call plug#begin() Plug 'junegunn/vim-easy-align', { 'needs': ['does-not-exist', 'sh'] } call plug#end() - PlugInstall! + PlugInstall + AssertExpect 'Please install does-not-exist first.', 0 q Assert !isdirectory(g:plugs['vim-easy-align'].dir), \ 'vim-easy-align should not exist'