Merge pull request #155 from linuxserver/fix-migrations

Fix migrations
This commit is contained in:
Eric Nemchik 2022-10-30 12:56:52 -05:00 committed by GitHub
commit 672802cf04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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