Skip to content

Commit

Permalink
fix(manage): only clear plugins for the op instead of all
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 24, 2022
1 parent 74d8b8e commit fc182f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/lazy/manage/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function M.run(ropts, opts)
ropts.concurrency = ropts.concurrency or opts.concurrency or Config.options.concurrency

if opts.clear then
M.clear()
M.clear(opts.plugins)
end

if opts.show ~= false then
Expand Down Expand Up @@ -162,8 +162,9 @@ function M.clean(opts)
end)
end

function M.clear()
for _, plugin in pairs(Config.plugins) do
---@param plugins? LazyPlugin[]
function M.clear(plugins)
for _, plugin in pairs(plugins or Config.plugins) do
plugin._.has_updates = nil
plugin._.updated = nil
plugin._.cloned = nil
Expand Down

0 comments on commit fc182f7

Please sign in to comment.