Hacker News new | ask | show | jobs
by cyberax 3 hours ago
Most scripts now put all the code into a shell function and call it in the last line of the script, so this bug can't happen.
1 comments

Correct, and/or in addition, most nowadays prepend something like `set -euo pipefail` to the scripts in the line immediately after the shebang which results in stopping on errors, including things such as syntax errors stemming from e.g. incomplete installer transmission over wire.

(At least for bash scripts, I’m not sure whether these are POSIX syntax to be frank.)