nvim: Fix crash on no python venv available

This commit is contained in:
Marty Oehme 2024-06-16 22:30:11 +02:00
parent fa1db974f0
commit fae2d85cca
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -33,7 +33,8 @@ local function path_join(...)
return table.concat(vim.tbl_flatten({ ... }), "/") return table.concat(vim.tbl_flatten({ ... }), "/")
end end
function T.set_python_env(workspace) function T.set_python_env(workspace)
local base = vim.fn.expand(require("core.util").get_python_venv_basefolder(workspace)) local base = require("core.util").get_python_venv_basefolder(workspace)
base = vim.fn.expand(base)
local p = vim.env.PATH or "" local p = vim.env.PATH or ""
if not base then if not base then
return return