Use of set -euo pipefail in Cylc generated job script

@TomC

Back on this topic, does my reply to your other post make any difference to your view here?

Specifically, while you have looked under the hood, users are not supposed to know (it is not documented) that script items happen to be run as separate functions by the job script boilerplate - that’s just internal implementation.

Given that, why would users put return 1 in their script fragments, as in your example, as opposed to inside their own functions - whose return values they can check if they like?

If I replace return 1 with exit 1 then Cylc 8 does still detect that as a job failure, even with set +e.

Hilary