To make your Bash script immediately exit when it encounters the error by setting shell attributes using `set` command.
`set -ex`
- `-e` - Exit immediately if pipeline, command or list of commands returns a non-zero status code.
### See also
- [[Bash]]
- [[Pipeline_(Linux)]]