mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
fix(build): use the shell to execute build commands
This commit is contained in:
parent
ffabe91b2d
commit
1371a14167
1 changed files with 5 additions and 3 deletions
|
@ -23,9 +23,11 @@ M.build = {
|
|||
elseif type(build) == "function" then
|
||||
build()
|
||||
else
|
||||
local args = vim.split(build, "%s+")
|
||||
return self:spawn(table.remove(args, 1), {
|
||||
args = args,
|
||||
local shell = vim.env.SHELL or vim.o.shell
|
||||
local shell_args = shell:find("cmd.exe", 1, true) and "/c" or "-c"
|
||||
|
||||
return self:spawn(shell, {
|
||||
args = { shell_args, build },
|
||||
cwd = self.plugin.dir,
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue