TIL we can prevent bash script from prematurely exiting using set +e
.
set +e
<some command>
set -e
This knowledge is useful if you want to run certain scripts and perform custom actions on the resultant exit code without losing information due to premature exits.
~ updated at: 2024-10-30T12:43:30.749Z