refactor: logging

This commit is contained in:
Folke Lemaitre 2024-06-26 18:31:31 +02:00
parent 765773a176
commit 6c7ef7e27a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
10 changed files with 130 additions and 80 deletions

View file

@ -106,15 +106,15 @@ function M.build(task)
if
not M.check({
error = function(msg)
task:notify_error(msg:gsub("[{}]", "`"))
task:error(msg:gsub("[{}]", "`"))
end,
warn = function(msg)
task:notify_warn(msg)
task:warn(msg)
end,
ok = function(msg) end,
})
then
task:notify_warn({
task:log({
"",
"This plugin requires `luarocks`. Try one of the following:",
" - fix your `luarocks` installation",