Add fn.exepath(cmd)

This commit is contained in:
Dheepak Krishnamurthy
2021-03-24 19:05:53 -06:00
parent 964018207e
commit 854b6738f1

View File

@@ -146,9 +146,10 @@ local function lazygit(path)
if path == nil then
path = project_root_dir()
end
path = vim.fn.fnameescape(path)
path = fn.fnameescape(path)
open_floating_window()
local cmd = "lazygit"
cmd = fn.fnameescape(fn.exepath(cmd))
if not vim.env.GIT_DIR then
cmd = cmd .. " -g " .. path .. "/.git/"
end