vhyrro/luarocks.nvim

Luarocks not finding git?

Closed this issue · 2 comments

luarocks-nvim: require("luarocks-nvim.health").check()

luarocks.nvim ~

  • luarocks system is not prepared
  • ERROR git is not installed! Please install it at https://git-scm.com/downloads.
  • OK lua is installed
  • OK make is installed

This is the output of checkhealth, I have no idea how its not picking up my git installation?

local build = require("luarocks-nvim.build")

return {
check = function()
vim.health.start("luarocks.nvim")
if build.is_prepared() then
vim.health.ok("luarocks is installed, system is prepared to install rocks!")
else
vim.health.info("luarocks system is not prepared")

        if vim.fn.executable("git") == 0 then
            vim.health.ok("git is installed")
        else
            vim.health.error("git is not installed! Please install it at https://git-scm.com/downloads.")
        end

        if vim.fn.executable("lua") == 1 then
            vim.health.ok("lua is installed")
        else
            vim.health.error("lua is not installed! If you're on unix, please install it using your package manager. For windows use https://github.com/rjpcomputing/luaforwindows.")
        end

        if not require("luarocks-nvim.utils").is_win() then
            if vim.fn.executable("make") == 1 then
                vim.health.ok("make is installed")
            else
                vim.health.error("make is not installed!")
            end
        end
	end
end,

}

This might be me being silly but is it because this line -> if vim.fn.executable("git") == 0 then should be if vim.fn.executable("git") == 1 then ??

What a silly error. Yep, you're right! Thanks for the issue, fixed in the latest commit :)