From 09c93f1b235dc07de18e63a5392bde17dddc29dd Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Tue, 11 Jun 2024 21:11:25 +0200 Subject: [PATCH] feat(config): add validation that luarocks binary is executable --- lua/rocks/config/check.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/rocks/config/check.lua b/lua/rocks/config/check.lua index 9faf8fdd..f27bd2c1 100644 --- a/lua/rocks/config/check.lua +++ b/lua/rocks/config/check.lua @@ -42,6 +42,9 @@ function check.validate(cfg) if not ok then return false, err end + if vim.fn.executable(cfg.luarocks_binary) ~= 1 then + return false, ("Cannot execute %s"):format(cfg.luarocks_binary) + end return true end