File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -299,24 +299,26 @@ check_services_health() {
299
299
HYPERSWITCH_BASE_URL=" http://localhost:8080"
300
300
HYPERSWITCH_HEALTH_URL=" ${HYPERSWITCH_BASE_URL} /health"
301
301
HYPERSWITCH_DEEP_HEALTH_URL=" ${HYPERSWITCH_BASE_URL} /health/ready"
302
-
302
+ local is_success=true
303
303
# Basic health check
304
- health_response=$( curl --silent --fail " ${HYPERSWITCH_HEALTH_URL} " ) || exit 0
304
+ health_response=$( curl --silent --fail " ${HYPERSWITCH_HEALTH_URL} " ) || is_success=false
305
305
if [ " ${health_response} " != " health is good" ]; then
306
- exit 0
306
+ is_success=false
307
307
fi
308
308
309
309
# Deep health check
310
- deep_health_response=$( curl --silent " ${HYPERSWITCH_DEEP_HEALTH_URL} " ) || exit 0
310
+ deep_health_response=$( curl --silent --fail " ${HYPERSWITCH_DEEP_HEALTH_URL} " ) || is_success=false
311
311
if [[ " $( echo " ${deep_health_response} " | jq --raw-output ' .error' ) " != " null" ]]; then
312
- exit 0
312
+ is_success=false
313
313
fi
314
314
315
315
# Extract version
316
- VERSION=$( curl --silent --output /dev/null --request GET --write-out ' %header{x-hyperswitch-version}' " ${HYPERSWITCH_BASE_URL} " | sed ' s/-dirty$//' )
317
- INSTALLATION_STATUS=" success"
316
+ if [ " ${is_success} " = true ]; then
317
+ VERSION=$( curl --silent --output /dev/null --request GET --write-out ' %header{x-hyperswitch-version}' " ${HYPERSWITCH_BASE_URL} " | sed ' s/-dirty$//' )
318
+ INSTALLATION_STATUS=" success"
319
+ scarf_call
320
+ fi
318
321
print_access_info
319
- scarf_call
320
322
}
321
323
322
324
print_access_info () {
@@ -368,8 +370,8 @@ scarf_call
368
370
show_banner
369
371
detect_docker_compose
370
372
check_prerequisites
371
- source .oneclick-setup.env
372
373
setup_config
374
+ source .oneclick-setup.env
373
375
select_profile
374
376
start_services
375
377
check_services_health
You can’t perform that action at this time.
0 commit comments