mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:20:03 +08:00
Fix build cwd option catch
This commit is contained in:
parent
0f88225ab3
commit
83882ba74f
@ -95,7 +95,15 @@ function! s:self.start(argv, ...) abort
|
||||
else
|
||||
let opts = {}
|
||||
endif
|
||||
if has_key(opts, 'cwd')
|
||||
let old_wd = getcwd()
|
||||
let cwd = expand(opts.cwd, 1)
|
||||
exe 'cd' fnameescape(cwd)
|
||||
endif
|
||||
let output = self.vim_co.systemlist(a:argv)
|
||||
if exists('old_wd')
|
||||
exe 'cd' fnameescape(old_wd)
|
||||
endif
|
||||
let id = -1
|
||||
if v:shell_error
|
||||
if has_key(opts,'on_stderr')
|
||||
|
@ -396,7 +396,8 @@ function! s:build(repo) abort
|
||||
call s:msg_on_build_start(a:repo.name)
|
||||
redraw!
|
||||
call s:JOB.start(argv,{
|
||||
\ 'on_exit' : function('s:on_build_exit')
|
||||
\ 'on_exit' : function('s:on_build_exit'),
|
||||
\ 'cwd' : a:repo.path,
|
||||
\ })
|
||||
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user