From b7063b07669c3ed8ed0e69aaf91c802168cfb1e6 Mon Sep 17 00:00:00 2001 From: Jonathan King Date: Wed, 12 Jul 2023 08:08:33 -0400 Subject: [PATCH] add pipefail to migrate_db function --- 10/root/usr/share/container-scripts/postgresql/common.sh | 1 + 12/root/usr/share/container-scripts/postgresql/common.sh | 1 + 13/root/usr/share/container-scripts/postgresql/common.sh | 1 + 14/root/usr/share/container-scripts/postgresql/common.sh | 1 + 15/root/usr/share/container-scripts/postgresql/common.sh | 1 + src/root/usr/share/container-scripts/postgresql/common.sh | 1 + 6 files changed, 6 insertions(+) diff --git a/10/root/usr/share/container-scripts/postgresql/common.sh b/10/root/usr/share/container-scripts/postgresql/common.sh index d5e6d579..445dee0a 100644 --- a/10/root/usr/share/container-scripts/postgresql/common.sh +++ b/10/root/usr/share/container-scripts/postgresql/common.sh @@ -250,6 +250,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi diff --git a/12/root/usr/share/container-scripts/postgresql/common.sh b/12/root/usr/share/container-scripts/postgresql/common.sh index 0d0d8ab5..a78fabc0 100644 --- a/12/root/usr/share/container-scripts/postgresql/common.sh +++ b/12/root/usr/share/container-scripts/postgresql/common.sh @@ -250,6 +250,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi diff --git a/13/root/usr/share/container-scripts/postgresql/common.sh b/13/root/usr/share/container-scripts/postgresql/common.sh index cfa6997f..f16e0a91 100644 --- a/13/root/usr/share/container-scripts/postgresql/common.sh +++ b/13/root/usr/share/container-scripts/postgresql/common.sh @@ -250,6 +250,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi diff --git a/14/root/usr/share/container-scripts/postgresql/common.sh b/14/root/usr/share/container-scripts/postgresql/common.sh index 97508b19..9dd4444e 100644 --- a/14/root/usr/share/container-scripts/postgresql/common.sh +++ b/14/root/usr/share/container-scripts/postgresql/common.sh @@ -250,6 +250,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi diff --git a/15/root/usr/share/container-scripts/postgresql/common.sh b/15/root/usr/share/container-scripts/postgresql/common.sh index 6963e78a..6e1eca10 100644 --- a/15/root/usr/share/container-scripts/postgresql/common.sh +++ b/15/root/usr/share/container-scripts/postgresql/common.sh @@ -250,6 +250,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi diff --git a/src/root/usr/share/container-scripts/postgresql/common.sh b/src/root/usr/share/container-scripts/postgresql/common.sh index 592b01d8..10a8388c 100644 --- a/src/root/usr/share/container-scripts/postgresql/common.sh +++ b/src/root/usr/share/container-scripts/postgresql/common.sh @@ -251,6 +251,7 @@ migrate_db () # Migration path. ( + set -o pipefail if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then echo '\set ON_ERROR_STOP on' fi