fix(laygit): normalize paths. Fixes #3327

This commit is contained in:
Folke Lemaitre 2024-05-27 05:35:47 +02:00
parent 61dc00147b
commit dbed614655
No known key found for this signature in database
GPG key ID: 36B7C1C85AAC487F

View file

@ -32,7 +32,7 @@ M.theme = {
unstagedChangesColor = { fg = "DiagnosticError" },
}
M.theme_path = vim.fn.stdpath("cache") .. "/lazygit-theme.yml"
M.theme_path = LazyVim.norm(vim.fn.stdpath("cache") .. "/lazygit-theme.yml")
-- re-create config file on startup
M.dirty = true
@ -69,7 +69,7 @@ function M.open(opts)
local ok, lines = pcall(Process.exec, { "lazygit", "-cd" })
if ok then
M.config_dir = lines[1]
vim.env.LG_CONFIG_FILE = M.config_dir .. "/config.yml" .. "," .. M.theme_path
vim.env.LG_CONFIG_FILE = LazyVim.norm(M.config_dir .. "/config.yml" .. "," .. M.theme_path)
else
---@diagnostic disable-next-line: cast-type-mismatch
---@cast lines string