Merge pull request #125 from linuxserver/jammy-migrations

Fix migrations
pull/128/head
Eric Nemchik 2022-10-30 12:58:35 -05:00 zatwierdzone przez GitHub
commit 2a8b481b69
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -19,10 +19,9 @@ for MIGRATION in $(find ${MIGRATIONS_DIR}/* | sort -n); do
fi fi
echo "[migrations] ${NAME}: executing..." echo "[migrations] ${NAME}: executing..."
chmod +x "${MIGRATION}" chmod +x "${MIGRATION}"
EXIT_CODE=$( # Execute migration script in a subshell to prevent it from modifying the current environment
/bin/bash "${MIGRATION}" ("${MIGRATION}")
echo $? EXIT_CODE=$?
)
if [[ ${EXIT_CODE} -ne 0 ]]; then if [[ ${EXIT_CODE} -ne 0 ]]; then
echo "[migrations] ${NAME}: failed with exit code ${EXIT_CODE}, contact support" echo "[migrations] ${NAME}: failed with exit code ${EXIT_CODE}, contact support"
exit "${EXIT_CODE}" exit "${EXIT_CODE}"