fix(health): only check for luarocks when luarocks is enabled.

This commit is contained in:
Folke Lemaitre 2024-06-24 20:03:00 +02:00
parent 77edda11bf
commit ae4881d36e
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 6 additions and 4 deletions

View File

@ -18,10 +18,12 @@ function M.check()
error("'git' not installed?") error("'git' not installed?")
end end
if vim.fn.executable("luarocks") == 1 then if Config.options.rocks.enabled then
ok("'luarocks' installed") if vim.fn.executable("luarocks") == 1 then
else ok("'luarocks' installed")
warn("'luarocks' not installed") else
error("'luarocks' not installed. Either install it or set opts.rocks.enabled = false")
end
end end
local sites = vim.opt.packpath:get() local sites = vim.opt.packpath:get()