mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 03:24:13 +00:00
fix(process): make sure cwd is a valid directory
This commit is contained in:
parent
736529d097
commit
92869d0928
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue