pgsql: ci: Add missing "set -e" to scripts run by su. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: ci: Add missing "set -e" to scripts run by su.
Date
Msg-id E1vGonw-005DdF-0w@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c3359d1cf5e563b89f5dc1c3be40d7c045cb99cb

Modified Files
--------------
.cirrus.tasks.yml | 3 +++
1 file changed, 3 insertions(+)


pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: pgsql: ci: Add missing "set -e" to scripts run by su.
Next
From: David Rowley
Date:
Subject: pgsql: Use stack allocated StringInfoDatas, where possible