mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
tests(indent): adapt scandir to nightly changes
Problem: `vim.fs.find` on Nvim 0.13 changed its return value to also return errors (if any), which broke its use for building a list of files in directories (since the empty error list got included). Solution: Only capture first return value.
This commit is contained in:
parent
e778b6097d
commit
8dfe21ae82
1 changed files with 2 additions and 2 deletions
|
|
@ -182,9 +182,9 @@ function Runner:whole_file(dirs, opts)
|
|||
return dir
|
||||
end, dirs)
|
||||
local scandir = function(dir)
|
||||
return vim.fs.find(function()
|
||||
return (vim.fs.find(function()
|
||||
return true
|
||||
end, { path = dir, limit = math.huge })
|
||||
end, { path = dir, limit = math.huge }))
|
||||
end
|
||||
local files = vim.iter(dirs):map(scandir):flatten()
|
||||
for _, file in files:enumerate() do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue