In bash, &&
will ignore errexit. This can lead to silently ignoring errors. Compare the output of:
0$ bash -c 'set -xe; false && false ; true; echo $?'
1+ false
2+ true
3+ echo 0
40
In theory this could be fixed by using a subshell:
0$ bash -c 'set -xe; ( false && false ) ; true; echo $?'
1+ false
However, it is easier to just remove the &&
.
This was introduced in commit faa807bdf8c3002a28005b4765604f518a6f2736