mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Print exception from post-update hook with : prefix
This commit is contained in:
parent
c0a83826f9
commit
5d8c4bfc1f
6
plug.vim
6
plug.vim
@ -809,7 +809,11 @@ function! s:do(pull, force, todo)
|
|||||||
if type == s:TYPE.string
|
if type == s:TYPE.string
|
||||||
if spec.do[0] == ':'
|
if spec.do[0] == ':'
|
||||||
call s:load_plugin(spec)
|
call s:load_plugin(spec)
|
||||||
execute spec.do[1:]
|
try
|
||||||
|
execute spec.do[1:]
|
||||||
|
catch
|
||||||
|
let error = v:exception
|
||||||
|
endtry
|
||||||
if !s:plug_window_exists()
|
if !s:plug_window_exists()
|
||||||
cd -
|
cd -
|
||||||
throw 'Warning: vim-plug was terminated by the post-update hook of '.name
|
throw 'Warning: vim-plug was terminated by the post-update hook of '.name
|
||||||
|
@ -970,6 +970,16 @@ Execute (Vim command with : prefix closing the window):
|
|||||||
Assert out =~ 'vim-plug was terminated'
|
Assert out =~ 'vim-plug was terminated'
|
||||||
Assert out =~ 'of vim-pseudocl'
|
Assert out =~ 'of vim-pseudocl'
|
||||||
|
|
||||||
|
Execute (Invalid vim command in post-update hook):
|
||||||
|
call plug#begin()
|
||||||
|
Plug 'junegunn/vim-pseudocl', { 'do': ':nosuchcommand' }
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
PlugInstall!
|
||||||
|
Log getline(1, '$')
|
||||||
|
AssertExpect! 'x Post-update hook for vim-pseudocl ... Vim:E492: Not an editor command: nosuchcommand', 1
|
||||||
|
q
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
~ Overriding `dir`
|
~ Overriding `dir`
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user