vhyrro / luarocks.nvim

Easily install luarocks with lazy.nvim
The Unlicense
64 stars 5 forks source link

Luarocks not finding git? #11

Closed mesa123123 closed 3 months ago

mesa123123 commented 3 months ago

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

luarocks.nvim ~

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

mesa123123 commented 3 months ago

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 ??

vhyrro commented 3 months ago

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