From 50eefbda08b9dec28a7070a15c4283487fccbdf7 Mon Sep 17 00:00:00 2001 From: Wikid82 Date: Wed, 19 Nov 2025 07:24:50 -0500 Subject: [PATCH] fix(hooks): use python3 fallback in compile check script --- tools/python_compile_check.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/python_compile_check.sh b/tools/python_compile_check.sh index 3221756c..2615f958 100755 --- a/tools/python_compile_check.sh +++ b/tools/python_compile_check.sh @@ -2,4 +2,11 @@ set -euo pipefail # Run python -m compileall quietly to catch syntax errors in the repo. -python -m compileall -q . +if command -v python3 &>/dev/null; then + python3 -m compileall -q . +elif command -v python &>/dev/null; then + python -m compileall -q . +else + echo "Error: neither python3 nor python found." + exit 1 +fi