File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 missing=()
4040 while IFS= read -r entry; do
4141 entry="${entry%$'\r'}"
42- entry="${entry## }"
43- entry="${entry%% }"
42+ entry="$(printf '%s' "${entry}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
4443 [[ -z "${entry}" ]] && continue
4544
4645 type="${entry%%:*}"
7170 exit 0
7271 fi
7372
74- printf 'Missing required GitHub configuration:\n- %s\n' "${missing[@]}" >&2
73+ echo "Missing required GitHub configuration:" >&2
74+ printf -- '- %s\n' "${missing[@]}" >&2
7575 exit 1
Original file line number Diff line number Diff line change 6161 for attempt in $(seq 1 "${CPFLOW_MAX_RETRIES}"); do
6262 echo "Health check attempt ${attempt}/${CPFLOW_MAX_RETRIES}"
6363
64- endpoint="$(cpln workload get "${CPFLOW_WORKLOAD_NAME}" --gvc "${CPFLOW_APP_NAME}" --org "${CPFLOW_ORG}" -o json | jq -r '.status.endpoint // empty')"
64+ if ! endpoint="$(cpln workload get "${CPFLOW_WORKLOAD_NAME}" --gvc "${CPFLOW_APP_NAME}" --org "${CPFLOW_ORG}" -o json | jq -r '.status.endpoint // empty')"; then
65+ echo "Unable to fetch workload endpoint; will retry if attempts remain."
66+ endpoint=""
67+ fi
6568 if [[ -n "${endpoint}" ]]; then
6669 http_status="$(curl -s -o /dev/null -w '%{http_code}' --max-time "${CPFLOW_CURL_MAX_TIME}" "${endpoint}" 2>/dev/null || echo 000)"
6770 echo "Endpoint: ${endpoint}, HTTP status: ${http_status}"
You can’t perform that action at this time.
0 commit comments