From ae4881d36e7f589124f8eb7febfc6a8b58f8e027 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 24 Jun 2024 20:03:00 +0200 Subject: [PATCH] fix(health): only check for luarocks when luarocks is enabled. --- lua/lazy/health.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/lazy/health.lua b/lua/lazy/health.lua index 3bfc3f5..c0a8981 100644 --- a/lua/lazy/health.lua +++ b/lua/lazy/health.lua @@ -18,10 +18,12 @@ function M.check() error("'git' not installed?") end - if vim.fn.executable("luarocks") == 1 then - ok("'luarocks' installed") - else - warn("'luarocks' not installed") + if Config.options.rocks.enabled then + if vim.fn.executable("luarocks") == 1 then + ok("'luarocks' installed") + else + error("'luarocks' not installed. Either install it or set opts.rocks.enabled = false") + end end local sites = vim.opt.packpath:get()