mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-10-24 03:02:14 +00:00
fix(plugin): check that path is actually in root dir. Closes #2075
This commit is contained in:
parent
1ea3c40857
commit
16e52715b7
2 changed files with 2 additions and 2 deletions
|
|
@ -240,7 +240,7 @@ function M.update_state()
|
|||
if plugin.virtual then
|
||||
plugin._.is_local = true
|
||||
plugin._.installed = true -- local plugins are managed by the user
|
||||
elseif plugin.dir:find(Config.options.root, 1, true) == 1 then
|
||||
elseif plugin.dir:find(Config.options.root .. "/", 1, true) == 1 then
|
||||
plugin._.installed = installed[plugin.name] ~= nil
|
||||
installed[plugin.name] = nil
|
||||
else
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ M.clean = {
|
|||
run = function(self, opts)
|
||||
opts = opts or {}
|
||||
local dir = self.plugin.dir:gsub("/+$", "")
|
||||
assert(dir:find(Config.options.root, 1, true) == 1, self.plugin.dir .. " should be under packpath!")
|
||||
assert(dir:find(Config.options.root .. "/", 1, true) == 1, self.plugin.dir .. " should be under packpath!")
|
||||
|
||||
local rock_root = Config.options.rocks.root .. "/" .. self.plugin.name
|
||||
if vim.uv.fs_stat(rock_root) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue