From 92869d0928ad3bb1aa61cf61897a78f3faa17835 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 10 Oct 2023 11:52:45 +0200 Subject: [PATCH] fix(process): make sure cwd is a valid directory --- lua/lazy/manage/process.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazy/manage/process.lua b/lua/lazy/manage/process.lua index 9b7fef4..00883e7 100644 --- a/lua/lazy/manage/process.lua +++ b/lua/lazy/manage/process.lua @@ -90,6 +90,11 @@ function M.spawn(cmd, opts) 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, { stdio = { nil, stdout, stderr }, args = opts.args,