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 Config.options.rocks.enabled then
if vim.fn.executable("luarocks") == 1 then if vim.fn.executable("luarocks") == 1 then
ok("'luarocks' installed") ok("'luarocks' installed")
else else
warn("'luarocks' not installed") 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()