Do not emit error for dashboard terminal section commands with non-0 exit codes #2045
Answered
by
drowning-cat
almostSouji
asked this question in
Q&A
Replies: 1 comment 4 replies
-
vim.api.nvim_create_autocmd('User', {
pattern = 'LazyDone',
group = vim.api.nvim_create_augroup('filter_notify', { clear = true }),
callback = function()
local notiy = vim.notify
vim.notify = function(msg, lvl, opts) ---@diagnostic disable-line: duplicate-set-field
if msg:match 'Terminal %*%*cmd%*%* .* failed with code' then
else
notiy(msg, lvl, opts)
end
end
end,
}) |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
almostSouji
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like
cmd
to ignore if the exit code is non-0 but cannot find a solution (i am potentially just blind and don't find some option)background: if a repository does not have issues enabled,
gh
will respond with exit code 1 and print the following when opening the dashboard:The element still correctly displays the text, which is expected and wanted:
I'd just like to prevent the "error" from popping up every time.
dashboard section in question:
Beta Was this translation helpful? Give feedback.
All reactions