fix(cache): properly return two values for finddir

This commit is contained in:
Folke Lemaitre 2023-01-02 14:46:49 +01:00
parent 8b6a98ad26
commit 1ec8f08480
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ function M.find_dir(modname)
local modpath = M.find(modname, { patterns = { "" } })
if modpath then
local root = modpath:gsub("/init%.lua$", ""):gsub("%.lua$", "")
return root, root ~= modpath and modpath or nil
return root, (root ~= modpath and modpath or nil)
end
end