feat(plugin): show error for local plugins that don't exist. Fixes #1773

This commit is contained in:
Folke Lemaitre 2024-12-05 09:06:28 +01:00
parent 56ead98e05
commit 9570a5ae7b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 15 additions and 0 deletions

View file

@ -97,4 +97,15 @@ M.docs = {
end,
}
M.exists = {
skip = function(plugin)
return not plugin._.is_local
end,
run = function(self)
if not Util.file_exists(self.plugin.dir) then
self:error("Local plugin does not exist at `" .. self.plugin.dir .. "`")
end
end,
}
return M