Refactor mason ensure_installed

This commit is contained in:
MasterLambaster 2024-08-04 14:31:45 +02:00
parent 12818a6cb4
commit 3310c32f1a

View file

@ -286,14 +286,12 @@ return {
end, 100) end, 100)
end) end)
mr.refresh(function() for _, tool in ipairs(opts.ensure_installed) do
for _, tool in ipairs(opts.ensure_installed) do if not mr.is_installed(tool) then
local p = mr.get_package(tool) local p = mr.get_package(tool)
if not p:is_installed() then p:install()
p:install()
end
end end
end) end
end, end,
}, },
} }