Skip to content

Commit

Permalink
fix(runner): only use Config.plugins when updated. Fixes #1560
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 26, 2024
1 parent 804cae0 commit 97f4df0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lua/lazy/manage/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ function M.install(opts)
"plugin.docs",
{
"wait",
sync = function()
---@param runner Runner
sync = function(runner)
require("lazy.pkg").update()
Plugin.load()
runner:update()
end,
},
"plugin.build",
Expand All @@ -114,9 +116,11 @@ function M.update(opts)
"plugin.docs",
{
"wait",
sync = function()
---@param runner Runner
sync = function(runner)
require("lazy.pkg").update()
Plugin.load()
runner:update()
end,
},
"plugin.build",
Expand Down
9 changes: 8 additions & 1 deletion lua/lazy/manage/runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ function Runner.new(opts)
end

function Runner:plugin(name)
return Config.plugins[name] or self._plugins[name]
return self._plugins[name]
end

--- Update plugins
function Runner:update()
for name in pairs(self._plugins) do
self._plugins[name] = Config.plugins[name] or self._plugins[name]
end
end

function Runner:start()
Expand Down

0 comments on commit 97f4df0

Please sign in to comment.