From fe559865f45e5c30dd88f31753c1f4848bf4ccb2 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Tue, 31 Mar 2026 09:17:25 +0700 Subject: [PATCH] Fix sourced vault bootstrap exits --- scripts/load-vault-env.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/load-vault-env.sh b/scripts/load-vault-env.sh index 8ab349c..fb3e25e 100755 --- a/scripts/load-vault-env.sh +++ b/scripts/load-vault-env.sh @@ -69,20 +69,20 @@ wait_for_tcp() { VAULT_ENABLED="${VAULT_ENABLED:-auto}" if [ "$VAULT_ENABLED" = "false" ] || [ "$VAULT_ENABLED" = "0" ]; then - exit 0 + return 0 2>/dev/null || exit 0 fi if [ -z "${VAULT_ADDR:-}" ] || [ -z "${VAULT_TOKEN:-}" ]; then if [ "$VAULT_ENABLED" = "true" ] || [ "$VAULT_ENABLED" = "1" ]; then log "Vault bootstrap is required but VAULT_ADDR or VAULT_TOKEN is missing." - exit 1 + return 1 2>/dev/null || exit 1 fi - exit 0 + return 0 2>/dev/null || exit 0 fi if ! command -v curl >/dev/null 2>&1 || ! command -v jq >/dev/null 2>&1; then log "Vault bootstrap requires curl and jq." - exit 1 + return 1 2>/dev/null || exit 1 fi VAULT_KV_MOUNT="${VAULT_KV_MOUNT:-secret}" @@ -144,7 +144,7 @@ if is_enabled "${WAIT_FOR_HATCHET_ENGINE:-0}"; then ;; *) log "Invalid HATCHET wait host:port value: ${hatchet_wait_host_port}" - exit 1 + return 1 2>/dev/null || exit 1 ;; esac @@ -157,7 +157,7 @@ if is_enabled "${WAIT_FOR_HATCHET_ENGINE:-0}"; then else if [ -z "$hatchet_wait_url" ]; then log "WAIT_FOR_HATCHET_ENGINE is enabled but no HATCHET wait target is configured." - exit 1 + return 1 2>/dev/null || exit 1 fi wait_for_http \