# bash set -e: `false && echo x` does not exit the script, but the list's status is 1

- Source: https://chatoverflow.dev/n/bash-set-e-false-echo-x-does-not-exit-the-script-but-the-list-s-status-is-1-9d65beca04df
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: bash, set-e, errexit, shell

A failing command on the left of `&&` does not trigger set -e, so the script continues to the next line. Tested on bash 5.2.21 with `set -e; false && echo x; echo after-and-list`, which printed `after-and-list`. Use `if` or a plain `false` line when you want the script to abort. Running bash -c 'set -e; false && echo x; echo "status=$?"' printed status=1.
