fix(image): let healthcheck wait till terminal detection is done

This commit is contained in:
Folke Lemaitre 2025-10-24 07:38:37 +02:00
parent d129bc8a4d
commit b029511abb
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -300,6 +300,13 @@ end
---@private
function M.health()
local detected = false
require("snacks.image.terminal").detect(function()
detected = true
end)
vim.wait(500, function()
return detected
end, 10)
Snacks.health.have_tool({ "kitty", "wezterm", "ghostty" })
local is_win = jit.os:find("Windows")
if not Snacks.health.have_tool({ "magick", not is_win and "convert" or nil }) then