mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-06 18:03:32 +02:00
Fail safely instead of degrading silently in spotify_to_plex startup
- Exit with a clear error if the /app/config migration fails, rather than continuing to run against the non-persistent source directory (user changes would otherwise silently vanish on the next restart). - Exit with a clear error if /app is missing instead of swallowing a broken upstream image layout with `|| true`. Addresses further review feedback from PR #2816. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZTfSk3GQRU7oD85TnjsmW
This commit is contained in:
@@ -11,7 +11,7 @@ if [ -d /app/config ] && [ ! -L /app/config ]; then
|
||||
if cp -rn /app/config/. "$CONFIG_TARGET/"; then
|
||||
rm -rf /app/config
|
||||
else
|
||||
bashio::log.error "Failed to migrate /app/config to $CONFIG_TARGET; leaving original config in place"
|
||||
bashio::exit.nok "Failed to migrate /app/config to $CONFIG_TARGET; refusing to start with a non-persistent config"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -36,5 +36,5 @@ if [ -z "${ENCRYPTION_KEY:-}" ]; then
|
||||
fi
|
||||
|
||||
# Hand off to the upstream supervisord (web + scraper + scheduler)
|
||||
cd /app || true
|
||||
cd /app || bashio::exit.nok "Cannot find /app (upstream image layout may have changed)"
|
||||
exec /docker-entrypoint.sh supervisord -n -c /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
Reference in New Issue
Block a user