diff --git a/.claude/scripts/sync.sh b/.claude/scripts/sync.sh index 6b45792..993617e 100755 --- a/.claude/scripts/sync.sh +++ b/.claude/scripts/sync.sh @@ -37,12 +37,17 @@ fi echo -e "${GREEN}[OK]${NC} Working directory: $(pwd)" -# Detect Python interpreter (python3 on Mac/Linux, python on Windows) -if command -v python3 >/dev/null 2>&1; then - PYTHON=python3 -elif command -v python >/dev/null 2>&1; then - PYTHON=python -else +# Detect Python interpreter — verify it actually runs (Windows Store stub passes command -v but fails to execute) +PYTHON="" +for candidate in python3 python; do + if command -v "$candidate" >/dev/null 2>&1; then + if "$candidate" -c "import sys; sys.exit(0)" >/dev/null 2>&1; then + PYTHON="$candidate" + break + fi + fi +done +if [ -z "$PYTHON" ]; then echo -e "${RED}[ERROR]${NC} No Python interpreter found (need python or python3)" exit 1 fi