Skip to content

Commit c3359d1

Browse files
committed
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 <tristan@partin.io> (earlier version) Discussion: https://postgr.es/m/DDZP25P4VZ48.3LWMZBGA1K9RH%40partin.io Backpatch-through: 15
1 parent 13efc28 commit c3359d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.cirrus.tasks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ task:
7676
# freebsd already takes longer than other platforms except for windows.
7777
configure_script: |
7878
su postgres <<-EOF
79+
set -e
7980
./configure \
8081
--enable-cassert --enable-debug --enable-tap-tests \
8182
--enable-nls \
@@ -181,6 +182,7 @@ task:
181182
182183
configure_script: |
183184
su postgres <<-EOF
185+
set -e
184186
./configure \
185187
--enable-cassert --enable-debug --enable-tap-tests \
186188
--enable-nls \
@@ -198,6 +200,7 @@ task:
198200

199201
test_world_script: |
200202
su postgres <<-EOF
203+
set -e
201204
ulimit -c unlimited # default is 0
202205
make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS}
203206
EOF

0 commit comments

Comments
 (0)