vim.fn.isdirectory(..) return 0/1
This commit is contained in:
@@ -165,8 +165,9 @@ local function lazygit(path)
|
|||||||
if path == nil then
|
if path == nil then
|
||||||
path = project_root_dir()
|
path = project_root_dir()
|
||||||
end
|
end
|
||||||
if path == nil or not fn.isdirectory(path .. '/.git/') then
|
if path == nil or fn.isdirectory(path .. '/.git/') == 0 then
|
||||||
print('Not in a git repository')
|
print('Not in a git repository')
|
||||||
|
return
|
||||||
end
|
end
|
||||||
open_floating_window()
|
open_floating_window()
|
||||||
local cmd = 'lazygit'
|
local cmd = 'lazygit'
|
||||||
|
|||||||
Reference in New Issue
Block a user