From c8b121958d68e6674ad4c932ed050b751dc074c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=B8=D0=BB=20=D0=93=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=B0=D1=80=D1=8C?= Date: Wed, 20 May 2026 18:03:59 +0300 Subject: [PATCH] Improve Python version check in installer script to handle errors gracefully --- install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 17472bb..04ad65e 100644 --- a/install.sh +++ b/install.sh @@ -155,10 +155,12 @@ install_uv() { check_python() { log_info "Checking Python $PYTHON_VERSION..." - if "$UV_CMD" python find "$PYTHON_VERSION" /dev/null; then + local py_path + py_path="$("$UV_CMD" python find "$PYTHON_VERSION" /dev/null)" || true + if [ -n "$py_path" ]; then local ver - ver="$("$UV_CMD" python find "$PYTHON_VERSION" &1)" - log_success "$ver found" + ver="$("$py_path" --version 2>&1)" || true + log_success "${ver:-Python $PYTHON_VERSION} found" return fi log_info "Installing Python $PYTHON_VERSION via uv..."