Fix Install Scripts

This commit is contained in:
2026-01-07 20:07:38 +00:00
parent e6ed6fcfac
commit a21cd50e9c
3 changed files with 27 additions and 5 deletions

View File

@@ -129,11 +129,17 @@ if [ -f "$HOME/.ardupilot_env" ]; then
echo "[OK] ArduPilot environment"
fi
# Deactivate any existing venv to avoid conflicts
if [ -n "$VIRTUAL_ENV" ]; then
deactivate 2>/dev/null || true
fi
# Activate ArduPilot venv (has empy and other dependencies)
# This is preferred over project venv for ArduPilot compatibility
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
source "$HOME/venv-ardupilot/bin/activate"
echo "[OK] ArduPilot venv"
# Fallback to project venv
# Fallback to project venv only if ArduPilot not installed
elif [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
source "$SCRIPT_DIR/venv/bin/activate"
echo "[OK] Python venv activated"

View File

@@ -183,11 +183,17 @@ if [ -f "$HOME/.ardupilot_env" ]; then
echo "[OK] ArduPilot environment"
fi
# Deactivate any existing venv to avoid conflicts
if [ -n "$VIRTUAL_ENV" ]; then
deactivate 2>/dev/null || true
fi
# Activate ArduPilot venv (has empy and other dependencies)
# This is preferred over project venv for ArduPilot compatibility
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
source "$HOME/venv-ardupilot/bin/activate"
echo "[OK] ArduPilot venv"
# Fallback to project venv
# Fallback to project venv only if ArduPilot not installed
elif [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then
source "$SCRIPT_DIR/venv/bin/activate"
echo "[OK] Python venv"