From f063e6da8cf51935847aadb7172bb1ecd625182e Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Thu, 2 Apr 2026 19:36:48 -0400 Subject: [PATCH] Fix missed auth failure due to jq 'null' string --- piawg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piawg.sh b/piawg.sh index 9d21c6a..3a22291 100755 --- a/piawg.sh +++ b/piawg.sh @@ -405,9 +405,9 @@ if ! bao_token_reply=$(_curl -H 'Content-Type: application/json' \ "$BAO_ADDR/v1/auth/$BAO_AUTH_PATH/login"); then err "Failed to login to '$BAO_ADDR'" fi -bao_token=$(printf '%s' "$bao_token_reply" | jq -er '.auth.client_token') +bao_token=$(printf '%s' "$bao_token_reply" | jq -er '.auth.client_token') || + err "Failed to get AppRole login token from '$BAO_ADDR'" unset bao_token_reply -[ -n "$bao_token" ] || err "Failed to get token from '$BAO_ADDR'" # Get latest PIA token get_token_reply="$(