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 <noreply@anthropic.com>
This commit is contained in:
parent
02fd277457
commit
8c5e01f660
1 changed files with 4 additions and 2 deletions
|
|
@ -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:"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue