Fix checking for python modules if python executable is missing
This commit is contained in:
@@ -59,6 +59,10 @@ end
|
|||||||
--- Asserts that a python module is installed
|
--- Asserts that a python module is installed
|
||||||
---@param mod string: The python module to check
|
---@param mod string: The python module to check
|
||||||
function M.python3_module_is_installed(mod)
|
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()
|
local resp = vim.system({ "python3", "-m", "pip", "show", mod, }):wait()
|
||||||
return resp.code == 0
|
return resp.code == 0
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user