Today I learned: set -e sucks even more. (opens in new tab)
Today I learned: set -e sucks even more. Summary: Just don’t use set -e. I’ve never been a fan “errexit” in shell. You’ve probably seen this as set -e, or set -o errexit or sh -e. People write lists of shell commands in a file and want the script to exit on the first one that fails rather than barreling on and causing damage. That seems sane. I’ve always strived to write “shell programs” rather than “shell scripts”. The difference being that the program will clean up after itself and give san...
Read the original article