diff --git a/lua/kulala/health.lua b/lua/kulala/health.lua index 8dc2830..2c66c2e 100644 --- a/lua/kulala/health.lua +++ b/lua/kulala/health.lua @@ -15,7 +15,9 @@ M.check = function() info("{kulala.nvim} version " .. GLOBALS.VERSION) local curl = CONFIG.get().curl_path if FS.command_exists(curl) then - ok(string.format("{%s} found", curl)) + local curl_path = FS.command_path(curl) + local curl_version = vim.fn.system({ curl_path, "--version" }) + ok(string.format("{curl} found: %s (version: %s)", curl_path, curl_version:gsub("^curl ([^ ]+).*", "%1"))) else error(string.format("{%s} not found", curl)) end diff --git a/lua/kulala/utils/fs.lua b/lua/kulala/utils/fs.lua index 20cdef4..fe3c42d 100644 --- a/lua/kulala/utils/fs.lua +++ b/lua/kulala/utils/fs.lua @@ -223,6 +223,10 @@ M.command_exists = function(cmd) return vim.fn.executable(cmd) == 1 end +M.command_path = function(cmd) + return vim.fn.exepath(cmd) +end + M.get_plugin_root_dir = function() local source = debug.getinfo(1).source local dir_path = source:match("@(.*/)") or source:match("@(.*\\)")