fix bug where it did not check the cwd for the .git folder
This commit is contained in:
@@ -363,12 +363,14 @@ do
|
||||
local function look_for_file(glob_pattern)
|
||||
---@type string[]
|
||||
local folders = {vim.fn.getcwd()}
|
||||
if not file_exists(folders[1], '.git') then
|
||||
for dir in vim.fs.parents(vim.fn.getcwd()) do
|
||||
table.insert(folders, dir)
|
||||
if file_exists(dir, '.git') then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, dir in ipairs(folders) do
|
||||
if file_exists(dir, glob_pattern) then
|
||||
|
||||
Reference in New Issue
Block a user