Skip to content

Commit

Permalink
fix(health): added luarocks check to health
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 24, 2024
1 parent 79c2efc commit 0f45c0d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lua/lazy/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ function M.check()
start("lazy.nvim")

if vim.fn.executable("git") == 1 then
ok("Git installed")
ok("'git' installed")
else
error("Git not installed?")
error("'git' not installed?")
end

if vim.fn.executable("luarocks") == 1 then
ok("'luarocks' installed")
else
error("'luarocks' not installed")
end

local sites = vim.opt.packpath:get()
Expand Down

7 comments on commit 0f45c0d

@clason
Copy link
Collaborator

@clason clason commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be downgraded to a warning (or even skipped) if luarocks support is disabled? (It can be disabled, right?)

@folke
Copy link
Owner Author

@folke folke commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to warning.

Disabling can be done with pkg.sources = {"lazy"},
or if you update lazy with rocks.enabled = false

@clason
Copy link
Collaborator

@clason clason commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg.sources = {"lazy"}

I already have pkg = {enabled = false} -- will add rocks.enabled = false for good measure ;)

@folke
Copy link
Owner Author

@folke folke commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that also works :)

@clason
Copy link
Collaborator

@clason clason commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to go the extra meter, you can skip the check completely for rocks.enabled = false ;)

@folke
Copy link
Owner Author

@folke folke commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And done!

@clason
Copy link
Collaborator

@clason clason commented on 0f45c0d Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eternal Sunshine of the Spotless Checkhealth 😌

Please sign in to comment.