mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-20 05:16:45 +00:00
fix(rocks): try building anyway even when prerequisits have not been met. (will likely fail)
This commit is contained in:
parent
0002bfbd9f
commit
f0324defdd
2 changed files with 41 additions and 27 deletions
|
@ -21,16 +21,23 @@ M.clean = {
|
|||
skip = function(plugin)
|
||||
return plugin._.is_local
|
||||
end,
|
||||
run = function(self)
|
||||
---@param opts? {rocks_only?:boolean}
|
||||
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!")
|
||||
rm(dir)
|
||||
|
||||
local rock_root = Config.options.rocks.root .. "/" .. self.plugin.name
|
||||
if vim.uv.fs_stat(rock_root) then
|
||||
rm(rock_root)
|
||||
end
|
||||
|
||||
if opts.rocks_only then
|
||||
return
|
||||
end
|
||||
|
||||
rm(dir)
|
||||
|
||||
self.plugin._.installed = false
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue