refactor: use new async code for runner and simplify task class

This commit is contained in:
Folke Lemaitre 2024-06-26 17:06:56 +02:00
parent 768de1ebf6
commit 765773a176
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 133 additions and 205 deletions

View file

@ -65,9 +65,7 @@ M.build = {
---@cast builders (string|fun(LazyPlugin))[]
for _, build in ipairs(builders) do
if type(build) == "function" then
self:async(function()
build(self.plugin)
end)
build(self.plugin)
elseif build == "rockspec" then
Rocks.build(self)
elseif build:sub(1, 1) == ":" then
@ -78,7 +76,7 @@ M.build = {
if not chunk or err then
error(err)
end
self:async(chunk)
chunk()
else
B.shell(self, build)
end