Skip to content

Commit

Permalink
fix(cache): dont return directories in lsmod
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 2, 2023
1 parent 60e96b4 commit 9893430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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, modpath
return root, (modpath ~= root and modpath or nil)
end
end

Expand Down

0 comments on commit 9893430

Please sign in to comment.