From c3359d1cf5e563b89f5dc1c3be40d7c045cb99cb Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 6 Nov 2025 13:24:30 +1300 Subject: [PATCH] ci: Add missing "set -e" to scripts run by su. If any shell command fails, the whole script should fail. To avoid future omissions, add this even for single-command scripts that use su with heredoc syntax, as they might be extended or copied-and-pasted. Extracted from a larger patch that wanted to use #error during compilation, leading to the diagnosis of this problem. Reviewed-by: Tristan Partin (earlier version) Discussion: https://postgr.es/m/DDZP25P4VZ48.3LWMZBGA1K9RH%40partin.io Backpatch-through: 15 --- .cirrus.tasks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cirrus.tasks.yml b/.cirrus.tasks.yml index 50dad5ca930..81ad6a164c6 100644 --- a/.cirrus.tasks.yml +++ b/.cirrus.tasks.yml @@ -76,6 +76,7 @@ task: # freebsd already takes longer than other platforms except for windows. configure_script: | su postgres <<-EOF + set -e ./configure \ --enable-cassert --enable-debug --enable-tap-tests \ --enable-nls \ @@ -181,6 +182,7 @@ task: configure_script: | su postgres <<-EOF + set -e ./configure \ --enable-cassert --enable-debug --enable-tap-tests \ --enable-nls \ @@ -198,6 +200,7 @@ task: test_world_script: | su postgres <<-EOF + set -e ulimit -c unlimited # default is 0 make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS} EOF -- 2.39.5