This commit is contained in:
legop3
2025-11-28 01:02:05 -05:00
parent 627e948c59
commit f40ab91c54
+4
View File
@@ -14,6 +14,10 @@ fi
# Strip any CRLFs to avoid sourcing a PUBLISH_URL with a stray carriage return in the name. # Strip any CRLFs to avoid sourcing a PUBLISH_URL with a stray carriage return in the name.
source <(tr -d '\r' < "$ENV_FILE") source <(tr -d '\r' < "$ENV_FILE")
PUBLISH_URL="${PUBLISH_URL:-}" PUBLISH_URL="${PUBLISH_URL:-}"
if [[ -z "${PUBLISH_URL}" ]]; then
# Fallback parser in case sourcing missed due to weird whitespace/BOM
PUBLISH_URL="$(grep -E '^PUBLISH_URL=' "$ENV_FILE" | head -n1 | cut -d= -f2- | tr -d '\r')"
fi
if [[ -z "${PUBLISH_URL}" ]]; then if [[ -z "${PUBLISH_URL}" ]]; then
echo "PUBLISH_URL not set in ${ENV_FILE}; contents:" >&2 echo "PUBLISH_URL not set in ${ENV_FILE}; contents:" >&2
sed -n '1,200p' "$ENV_FILE" >&2 sed -n '1,200p' "$ENV_FILE" >&2