Skip to content

Commit

Permalink
fix(health): only check for luarocks when luarocks is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 24, 2024
1 parent 77edda1 commit ae4881d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/lazy/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ae4881d

Please sign in to comment.