1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

fix(bootstrap_script): use try/catch for bootstrap_script

This commit is contained in:
wsdjeg 2022-06-03 13:14:27 +08:00
parent 842f29f6d7
commit db520883c9

View File

@ -219,7 +219,13 @@ function! s:apply(config, type) abort
let bootstrap_script = get(options, 'bootstrap_script', '')
if !empty(bootstrap_script) && exists('*nvim_exec')
call nvim_exec(bootstrap_script, 0)
try
call nvim_exec(bootstrap_script, 0)
catch
call SpaceVim#logger#error('failed to execute bootstrap_script.')
call SpaceVim#logger#error(' exception: ' . v:exception)
call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint)
endtry
endif
if !empty(bootstrap_before)