From 9858001c3cdb5713e8d1aeb0f47c23038084fd7c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 20 Jan 2023 20:41:29 +0100 Subject: [PATCH] fix(git): unset GIT_DIR when spawning a process. Fixes #434 --- lua/lazy/manage/process.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/manage/process.lua b/lua/lazy/manage/process.lua index 79279a0d..2ddcff1e 100644 --- a/lua/lazy/manage/process.lua +++ b/lua/lazy/manage/process.lua @@ -68,7 +68,9 @@ function M.spawn(cmd, opts) for key, value in pairs(uv.os_environ() --[[@as string[] ]]) do - table.insert(env, key .. "=" .. value) + if key ~= "GIT_DIR" then + table.insert(env, key .. "=" .. value) + end end local stdout = uv.new_pipe()