fix(script): add Windows .venv/Scripts path fallback in server.sh

On Windows the venv Python binary lives at .venv/Scripts/python.exe,
not .venv/bin/python.  Fall back to the Windows path when the Unix
path does not exist so the script works cross-platform.
This commit is contained in:
Brandon Zhang
2026-03-27 13:53:38 +08:00
parent 009fd039a2
commit b1fdd98740
4 changed files with 749 additions and 0 deletions

View File

@@ -15,6 +15,9 @@ set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON="$ROOT/.venv/bin/python"
if [ ! -f "$PYTHON" ]; then
PYTHON="$ROOT/.venv/Scripts/python.exe"
fi
ENTRY="$ROOT/main.py"
LOG_DIR="$ROOT/logs"
LOG_OUT="$LOG_DIR/server.log"