fix: prevent silent exit when registration_token is empty

The [[ -n "$json_token" ]] && ... pattern returns exit code 1
when json_token is empty, causing script to exit due to set -e.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Matt 2025-12-08 16:31:25 +01:00
parent f467869cf5
commit 0828fa7ac7
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ parse_json() {
# Registration token (can also be set via environment variable)
local json_token=$(echo "$json" | jq -r '.registration_token // empty')
[[ -n "$json_token" ]] && SYSADMIN_REGISTRATION_TOKEN="$json_token"
[[ -n "$json_token" ]] && SYSADMIN_REGISTRATION_TOKEN="$json_token" || true
}
# =============================================================================