From 2b6117a75d604907439bafba50a38b991f9b6561 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Wed, 8 Apr 2020 14:08:49 -0600 Subject: [PATCH] Fix empty file bug --- lua/lazygit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index c78bfde..cf74c78 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -124,7 +124,7 @@ local function lazygitconfig() else config_file = "~/.config/jesseduffield/lazygit/config.yml" end - if fn.empty(fn.glob(config_file)) then + if fn.empty(fn.glob(config_file)) == 1 then -- file does not exist -- check if user wants to create it local answer = fn.confirm("File " .. config_file .. " does not exist.\nDo you want to create the file and populate it with the default configuration?", "&Yes\n&No")