This commit is contained in:
Andy Tien 2026-04-24 16:33:16 -05:00 committed by GitHub
commit f4d3067e36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 163 additions and 0 deletions

View file

@ -1437,6 +1437,17 @@ def get_python_path() -> str:
venv_python = venv / "bin" / "python"
if venv_python.exists():
return str(venv_python)
# Fallback: use PROJECT_ROOT/venv/bin/python (same logic as generate_systemd_unit)
# This is more reliable than sys.executable when running under uv.
fallback_venv = PROJECT_ROOT / "venv"
if is_windows():
fallback_python = fallback_venv / "Scripts" / "python.exe"
else:
fallback_python = fallback_venv / "bin" / "python"
if fallback_python.exists():
return str(fallback_python)
return sys.executable