You can still use
set -e. If you have specific statement which you expect to fail, you simply need to catch the error state and "handle" it:
$ cat 454756.sh
[[ 1 -eq 2 ]] || :
echo "Still got here!"
Still got here!
set -e will abort the script on any uncaught error condition. Otherwise you would not be able to use
# this also still works
if /bin/false; then
|| : is a succinct way to "eat" any error thrown by any command, which is handy when you're wanting to use
set -e and have specific commands whose failure is perfectly okay.
Another way to do this is to unset
-e before the command in question, and reset it afterward: