From 1c6d546a664edfed33d9517304c75a48357546fc Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Tue, 5 Sep 2023 19:37:33 +0200 Subject: [PATCH] Fix checking for python modules if python executable is missing --- lua/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/utils.lua b/lua/utils.lua index 0d36156..9bdfa7b 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -59,6 +59,10 @@ end --- Asserts that a python module is installed ---@param mod string: The python module to check function M.python3_module_is_installed(mod) + if not M.is_installed("python3") then + return false + end + local resp = vim.system({ "python3", "-m", "pip", "show", mod, }):wait() return resp.code == 0 end