mirror of https://github.com/folke/lazy.nvim.git
fix(ui): don't show output when it's the same as error
This commit is contained in:
parent
28e435b7f3
commit
e79805d706
|
@ -472,7 +472,7 @@ function M:tasks(plugin)
|
|||
if not task.error and not task.warn and task.name == "log" then
|
||||
self:log(task)
|
||||
end
|
||||
if self.view:is_selected(plugin) or (task.error or task.warn) then
|
||||
if (self.view:is_selected(plugin) or (task.error or task.warn)) and task.output ~= task.error then
|
||||
self:markdown(vim.trim(task.output), "LazyTaskOutput", { indent = 6 })
|
||||
end
|
||||
end
|
||||
|
@ -485,6 +485,7 @@ function M:log(task)
|
|||
local lines = vim.split(log, "\n")
|
||||
for _, line in ipairs(lines) do
|
||||
local ref, msg, time = line:match("^(%w+) (.*) (%(.*%))$")
|
||||
if msg then
|
||||
if msg:find("^%S+!:") then
|
||||
self:diagnostic({ message = "Breaking Changes", severity = vim.diagnostic.severity.WARN })
|
||||
end
|
||||
|
@ -506,6 +507,9 @@ function M:log(task)
|
|||
})
|
||||
self:append(" " .. time, "LazyComment")
|
||||
self:nl()
|
||||
-- else
|
||||
-- self:append(line, "LazyTaskOutput", { indent = 6 }):nl()
|
||||
end
|
||||
end
|
||||
self:nl()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue