mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:20:04 +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
|
else
|
||||||
let opts = {}
|
let opts = {}
|
||||||
endif
|
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)
|
let output = self.vim_co.systemlist(a:argv)
|
||||||
|
if exists('old_wd')
|
||||||
|
exe 'cd' fnameescape(old_wd)
|
||||||
|
endif
|
||||||
let id = -1
|
let id = -1
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
if has_key(opts,'on_stderr')
|
if has_key(opts,'on_stderr')
|
||||||
|
@ -396,7 +396,8 @@ function! s:build(repo) abort
|
|||||||
call s:msg_on_build_start(a:repo.name)
|
call s:msg_on_build_start(a:repo.name)
|
||||||
redraw!
|
redraw!
|
||||||
call s:JOB.start(argv,{
|
call s:JOB.start(argv,{
|
||||||
\ 'on_exit' : function('s:on_build_exit')
|
\ 'on_exit' : function('s:on_build_exit'),
|
||||||
|
\ 'cwd' : a:repo.path,
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user