From 997bd8984c34d46df322e8885179db0dcd29d74d Mon Sep 17 00:00:00 2001 From: MickLesk Date: Mon, 18 May 2026 16:23:34 +0200 Subject: [PATCH] fix(fleet): handle empty setup response without aborting on pipefail --- install/fleet-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/fleet-install.sh b/install/fleet-install.sh index 83e1f06e..7ae77888 100644 --- a/install/fleet-install.sh +++ b/install/fleet-install.sh @@ -78,7 +78,7 @@ done SETUP_RESPONSE=$(curl -s -X POST "http://127.0.0.1:8080/api/latest/fleet/setup" \ -H "Content-Type: application/json" \ -d "{\"admin\":{\"admin\":true,\"email\":\"${FLEET_ADMIN_EMAIL}\",\"name\":\"Admin\",\"password\":\"${FLEET_ADMIN_PASS}\"},\"org_info\":{\"org_name\":\"Fleet\",\"org_logo_url\":\"\"},\"server_url\":\"http://127.0.0.1:8080\"}") -FLEET_TOKEN=$(echo "${SETUP_RESPONSE}" | grep -o '"token":"[^"]*"' | cut -d'"' -f4) +FLEET_TOKEN=$(echo "${SETUP_RESPONSE}" | grep -o '"token":"[^"]*"' | cut -d'"' -f4) || true if [[ -n "${FLEET_TOKEN}" ]]; then curl -s -X PATCH "http://127.0.0.1:8080/api/latest/fleet/config" \ -H "Content-Type: application/json" \