diff --git a/pi/bin/video-publisher.sh b/pi/bin/video-publisher.sh index ba79fdc1..3b245198 100644 --- a/pi/bin/video-publisher.sh +++ b/pi/bin/video-publisher.sh @@ -11,7 +11,8 @@ if [[ ! -f "$ENV_FILE" ]]; then fi # shellcheck disable=SC1090 -source "$ENV_FILE" +# Strip any CRLFs to avoid sourcing a PUBLISH_URL with a stray carriage return in the name. +source <(tr -d '\r' < "$ENV_FILE") PUBLISH_URL="${PUBLISH_URL:-}" if [[ -z "${PUBLISH_URL}" ]]; then echo "PUBLISH_URL not set in ${ENV_FILE}; contents:" >&2