From 8c5e01f6602fe736178e38add653a40a85f4c8af Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Fri, 24 Apr 2026 15:18:10 +0100 Subject: [PATCH] Fix deploy.sh: health check false-failure on --backend-only / --frontend-only `A && B || C` in bash fires C when A is false (service intentionally skipped). Replaced with if/fi blocks so || FAILED=1 only triggers when the health check itself fails. Co-Authored-By: Claude Sonnet 4.6 --- scripts/deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 2fbe38e..9600fa1 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -105,10 +105,12 @@ check_health() { } FAILED=0 -[[ -z "$SERVICES" || "$SERVICES" == "backend" ]] && \ +if [[ -z "$SERVICES" || "$SERVICES" == "backend" ]]; then check_health "backend" "http://localhost:${BACKEND_PORT}/api/health" || FAILED=1 -[[ -z "$SERVICES" || "$SERVICES" == "frontend" ]] && \ +fi +if [[ -z "$SERVICES" || "$SERVICES" == "frontend" ]]; then check_health "frontend" "http://localhost:${FRONTEND_PORT}/notebookllama" || FAILED=1 +fi if [[ "$FAILED" -eq 1 ]]; then fail "Health check failed — last 50 log lines:"