From 431c2b87dbaede44cbe05a88d1c951df0604d200 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Tue, 14 Jul 2026 22:53:31 -0400 Subject: [PATCH] Fix realm_url conditional syntax in base-state auth helper --- .gitea/workflows/cicd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index 7ecfa6f..7010907 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -157,7 +157,7 @@ jobs: headers_file="$(mktemp)" if curl -sSI "http://${GITEA_REGISTRY}/v2/" >"${headers_file}"; then realm_url="$(sed -n 's/.*realm="\([^"]*\)".*/\1/p' "${headers_file}" | head -n 1)" - if [ -n "${realm_url}"; then + if [ -n "${realm_url}" ]; then realm_host="$(printf '%s' "${realm_url}" | sed -E 's#^https?://([^/:]+).*$#\1#')" if [ -n "${realm_host}" ] && [ "${realm_host}" != "${GITEA_REGISTRY_HOST}" ]; then if ! grep -q "${realm_host}" /etc/hosts; then