From dbed614655fdf13436654356c0ba156d45ee7cc4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 27 May 2024 05:35:47 +0200 Subject: [PATCH] fix(laygit): normalize paths. Fixes #3327 --- lua/lazyvim/util/lazygit.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lazygit.lua b/lua/lazyvim/util/lazygit.lua index d5586f7f..e360ad82 100644 --- a/lua/lazyvim/util/lazygit.lua +++ b/lua/lazyvim/util/lazygit.lua @@ -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