Fail-fast/pipefail behaviour for default shell inconsistent with documentation
See original GitHub issueDescribe the bug The documentation states that
Fail-fast behavior using set -eo pipefail: Default for bash and built-in shell. It is also the default when you don’t provide an option on non-Windows platforms. (my emphasis)
The last statement does not appear to be true, as false | true
passes on ubuntu-latest
when not explicitly setting the shell
option.
To Reproduce Steps to reproduce the behavior:
- Run workflow file:
name: Test pipefail
on:
push
jobs:
test-pipefail:
name: Test
runs-on: ubuntu-latest
steps:
- name: Run command false first
if: always()
run: false | true
- name: Run command false last
if: always()
run: true | false
- Observe that only second step fails
Expected behavior I expect that the behaviour of the runner to be consistent with the documentation, ie. that both steps in the above example fails, or that the documentation is updated to reflect the actual behaviour.
Runner Version and Platform
Built in runner using ubuntu-latest
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think there’s still a bug here; this page says that
bash
is the default shell, and that it is invoked withbash --noprofile --norc -eo pipefail {0}
:I think that table should have an extra row called “(default)”, which is specified as
bash -e {0}
.Hi, another thing that affects this, because the default/unspecified shell is
bash -e
with theerrexit
flag, this does result in fail fast behavior by default, which is not mentioned here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference . Perhaps mentioning both would be clearest?