mirror of https://github.com/folke/lazy.nvim.git
fix(process): make sure cwd is a valid directory
This commit is contained in:
parent
736529d097
commit
92869d0928
|
@ -90,6 +90,11 @@ function M.spawn(cmd, opts)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- make sure the cwd is valid
|
||||||
|
if not opts.cwd and type(uv.cwd()) ~= "string" then
|
||||||
|
opts.cwd = uv.os_homedir()
|
||||||
|
end
|
||||||
|
|
||||||
handle = uv.spawn(cmd, {
|
handle = uv.spawn(cmd, {
|
||||||
stdio = { nil, stdout, stderr },
|
stdio = { nil, stdout, stderr },
|
||||||
args = opts.args,
|
args = opts.args,
|
||||||
|
|
Loading…
Reference in New Issue