feat(commands): added build command to force rebuild of a plugin

This commit is contained in:
Folke Lemaitre 2023-01-01 09:41:43 +01:00
parent 205ce42cdc
commit 23c0587791
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 31 additions and 4 deletions

View file

@ -5,7 +5,11 @@ local Loader = require("lazy.core.loader")
local M = {}
M.build = {
skip = function(plugin)
---@param opts? {force:boolean}
skip = function(plugin, opts)
if opts and opts.force then
return false
end
return not (plugin._.dirty and plugin.build)
end,
run = function(self)