# Use of set -euo pipefail in Cylc generated job script

**URL:** <https://cylc.discourse.group/t/use-of-set-euo-pipefail-in-cylc-generated-job-script/613>\
**Category:** Cylc Support\
**Created:** [March 23, 2023, 1:31am UTC](https://cylc.discourse.group/t/use-of-set-euo-pipefail-in-cylc-generated-job-script/613 "2023-03-23T01:31:24Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [March 24, 2023, 3:51am UTC](https://cylc.discourse.group/t/use-of-set-euo-pipefail-in-cylc-generated-job-script/613/17 "2023-03-24T03:51:26Z")

</div>

@TomC

Back on this topic, does my reply to [your other post](https://cylc.discourse.group/t/when-should-post-script-run/615) 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

---

_[View the full topic](https://cylc.discourse.group/t/use-of-set-euo-pipefail-in-cylc-generated-job-script/613)._
