Add double quotes
This commit is contained in:
@@ -146,16 +146,15 @@ local function lazygit(path)
|
|||||||
if path == nil then
|
if path == nil then
|
||||||
path = project_root_dir()
|
path = project_root_dir()
|
||||||
end
|
end
|
||||||
path = fn.fnameescape(path)
|
|
||||||
open_floating_window()
|
open_floating_window()
|
||||||
local cmd = "lazygit"
|
local cmd = "lazygit"
|
||||||
cmd = fn.fnameescape(fn.exepath(cmd))
|
|
||||||
if not vim.env.GIT_DIR then
|
if not vim.env.GIT_DIR then
|
||||||
cmd = cmd .. " -g " .. path .. "/.git/"
|
cmd = cmd .. " -g \"" .. path .. "/.git/\""
|
||||||
end
|
end
|
||||||
if not vim.env.GIT_WORK_TREE then
|
if not vim.env.GIT_WORK_TREE then
|
||||||
cmd = cmd .. " -w " .. path
|
cmd = cmd .. " -w \"" .. path .. "\""
|
||||||
end
|
end
|
||||||
|
print(cmd)
|
||||||
exec_lazygit_command(cmd)
|
exec_lazygit_command(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user