From 44e8531147dba690a3e7ede63bed5dda2e9c5c0c Mon Sep 17 00:00:00 2001 From: Nazeeh ElDirghami Date: Wed, 21 Jul 2021 10:36:28 -0700 Subject: [PATCH] fix lazygit launching on Windows --- lua/lazygit.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index eb67cbf..0b05149 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -19,9 +19,11 @@ end --- Get project_root_dir for git repository local function project_root_dir() - -- always use bash + -- always use bash on Unix based systems. local oldshell = vim.o.shell - vim.o.shell = 'bash' + if vim.fn.has('win32') == 0 then + vim.o.shell = 'bash' + end -- try submodule first local gitdir = fn.system('cd "' .. fn.expand('%:p:h') .. '" && git rev-parse --show-superproject-working-tree')