mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-16 05:41:49 +02:00
Fix corrupted HEALTH_URL and ASCII art in Dockerfiles caused by version updater
The addons_updater script's global sed replacement corrupted Dockerfiles
when the upstream_version was empty (""), replacing all empty double-quoted
strings with version strings. This corrupted:
- HEALTH_URL values (causing malformed health check URLs and container
instability from failed health checks)
- ASCII art comments in Dockerfile headers
Fixed affected addons: guacamole, tdarr, photoprism, enedisgateway2mqtt_dev,
gazpar2mqtt, seafile
Also added a guard in the updater script to skip updates when version
strings are empty, preventing this corruption from recurring.
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
@@ -319,6 +319,12 @@ for f in */; do
|
||||
LASTVERSION2=${LASTVERSION//+/-}
|
||||
CURRENT2=${CURRENT//+/-}
|
||||
|
||||
# Skip if current or last version is empty (would corrupt files by replacing all "" occurrences)
|
||||
if [ "${CURRENT}" = '""' ] || [ "${LASTVERSION}" = '""' ]; then
|
||||
bashio::log.warning "... $SLUG : skipping update due to empty version string (current=${CURRENT}, latest=${LASTVERSION})"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Update if needed
|
||||
if [ "${CURRENT2}" != "${LASTVERSION2}" ]; then
|
||||
LOGINFO="... $SLUG : update from ${CURRENT} to ${LASTVERSION}" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
|
||||
Reference in New Issue
Block a user