Skip to content

Commit 92869d0

Browse files
committedOct 10, 2023
fix(process): make sure cwd is a valid directory
1 parent 736529d commit 92869d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎lua/lazy/manage/process.lua

+5
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ function M.spawn(cmd, opts)
9090
end)
9191
end
9292

93+
-- make sure the cwd is valid
94+
if not opts.cwd and type(uv.cwd()) ~= "string" then
95+
opts.cwd = uv.os_homedir()
96+
end
97+
9398
handle = uv.spawn(cmd, {
9499
stdio = { nil, stdout, stderr },
95100
args = opts.args,

0 commit comments

Comments
 (0)
Please sign in to comment.