diff --git a/Docker/push.sh b/Docker/push.sh index 9c7c173..4e9851e 100644 --- a/Docker/push.sh +++ b/Docker/push.sh @@ -59,9 +59,26 @@ else err "Neither podman nor docker is installed." fi -# --------------------------------------------------------------------------- +# ------------------------------------------------------------------- +# Refuse to run from inside a confined snap sandbox (e.g. the VS Code +# integrated terminal). When the script is launched from such a +# sandbox, $HOME points under /home/$USER/snap/code// and podman +# stores its DB under that path. If a snap revision bump happens mid +# session, the next podman invocation finds a stale static-dir pointer +# and aborts with a confusing "database static dir ... does not match" +# error. Re-run the script from a regular host shell instead. +# ------------------------------------------------------------------- +case "${HOME:-}" in + /home/*/snap/*) + err "Refusing to run inside a snap-sandboxed HOME (${HOME}). \ +Re-run from a regular host terminal (e.g. gnome-terminal, konsole) \ +so podman uses a stable storage path." + ;; +esac + +# ------------------------------------------------------------------- # Pre-flight checks -# --------------------------------------------------------------------------- +# ------------------------------------------------------------------- echo "============================================" echo " AniWorld — Build & Push" echo " Engine : ${ENGINE}"