Skip to content

Commit c0fd59b

Browse files
committed
feat(health): show steps to get luarocks working. See #1570
1 parent 8227632 commit c0fd59b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lua/lazy/health.lua

+11-1
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,21 @@ function M.check()
145145

146146
info("you have some plugins that require `luarocks`:\n" .. table.concat(lines, "\n"))
147147
end
148-
require("lazy.pkg.rockspec").check({
148+
local ok = require("lazy.pkg.rockspec").check({
149149
error = #need_luarocks > 0 and error or warn,
150150
warn = warn,
151151
ok = ok,
152152
})
153+
if not ok then
154+
warn(table.concat({
155+
"Lazy won't be able to install plugins that require `luarocks`.",
156+
"Here's what you can do:",
157+
" - fix your `luarocks` installation",
158+
Config.options.rocks.hererocks and " - disable *hererocks* with `opts.rocks.hererocks = false`"
159+
or " - enable `hererocks` with `opts.rocks.hererocks = true`",
160+
" - disable `luarocks` support completely with `opts.rocks.enabled = false`",
161+
}, "\n"))
162+
end
153163
else
154164
ok("luarocks disabled")
155165
end

0 commit comments

Comments
 (0)