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:
parent
f467869cf5
commit
0828fa7ac7
|
|
@ -142,7 +142,7 @@ parse_json() {
|
||||||
|
|
||||||
# Registration token (can also be set via environment variable)
|
# Registration token (can also be set via environment variable)
|
||||||
local json_token=$(echo "$json" | jq -r '.registration_token // empty')
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue