From 44e2c86da9848718b46436a085eb4f0e671d1055 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 25 Apr 2022 12:58:25 +0800 Subject: [PATCH] fix(job): make job api support env option --- .SpaceVim.d/tasks.toml | 6 ++++++ autoload/SpaceVim/api/job.vim | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.SpaceVim.d/tasks.toml b/.SpaceVim.d/tasks.toml index 002ad9d91..72962c369 100644 --- a/.SpaceVim.d/tasks.toml +++ b/.SpaceVim.d/tasks.toml @@ -1,3 +1,9 @@ +[vader-test] + command = "make" + args = ['test'] + isBackground = false +[vader-test.options.env] + VIM_BIN = 'nvim' [generate-vim-doc] command = "python" args = ['-m', 'vimdoc', '.'] diff --git a/autoload/SpaceVim/api/job.vim b/autoload/SpaceVim/api/job.vim index 011d09a98..c810183a4 100644 --- a/autoload/SpaceVim/api/job.vim +++ b/autoload/SpaceVim/api/job.vim @@ -159,6 +159,9 @@ function! s:self.warp_nvim(argv, opts) abort dict if has_key(a:opts, 'cwd') call extend(obj.opts, {'cwd' : a:opts.cwd}) endif + if has_key(a:opts, 'env') + call extend(obj.opts, {'env' : a:opts.env}) + endif return obj endfunction