mirror of https://github.com/folke/lazy.nvim.git
fix(build): use the shell to execute build commands
This commit is contained in:
parent
ffabe91b2d
commit
1371a14167
|
@ -23,9 +23,11 @@ M.build = {
|
||||||
elseif type(build) == "function" then
|
elseif type(build) == "function" then
|
||||||
build()
|
build()
|
||||||
else
|
else
|
||||||
local args = vim.split(build, "%s+")
|
local shell = vim.env.SHELL or vim.o.shell
|
||||||
return self:spawn(table.remove(args, 1), {
|
local shell_args = shell:find("cmd.exe", 1, true) and "/c" or "-c"
|
||||||
args = args,
|
|
||||||
|
return self:spawn(shell, {
|
||||||
|
args = { shell_args, build },
|
||||||
cwd = self.plugin.dir,
|
cwd = self.plugin.dir,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue