Update python.lua
This commit is contained in:
@@ -157,14 +157,10 @@ end
|
|||||||
|
|
||||||
function M.run()
|
function M.run()
|
||||||
local root = M.get_project_root()
|
local root = M.get_project_root()
|
||||||
if not root then
|
if not root then return print("Error: Project root not found.") end
|
||||||
return print("Error: Project root not found.")
|
|
||||||
end
|
|
||||||
|
|
||||||
local main_file = root .. "/main.py"
|
local main_file = root .. "/main.py"
|
||||||
if vim.fn.filereadable(main_file) == 0 then
|
if vim.fn.filereadable(main_file) == 0 then return print("Error: main.py not found in project root.") end
|
||||||
return print("Error: main.py not found in project root.")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check if virtual environment exists
|
-- Check if virtual environment exists
|
||||||
local venv_path = root .. "/venv/bin/activate"
|
local venv_path = root .. "/venv/bin/activate"
|
||||||
|
|||||||
Reference in New Issue
Block a user