fix(runner): only use Config.plugins when updated. Fixes #1560

This commit is contained in:
Folke Lemaitre 2024-06-26 19:39:08 +02:00
parent 804cae0a65
commit 97f4df0824
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 14 additions and 3 deletions

View File

@ -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",
@ -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",

View File

@ -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()