On Wed, Aug 31, 2022 at 08:59:15AM +0200, Laszlo Ersek wrote:
Now, whether this kills "set -e" for me for good... I'm
not so sure. I'm
trying to think up a shell function that I would want to (a) call from
an outer conditional context, and at the same time (b) cause the whole
script to abort due to an internal error.
I'm going to add it to the large and growing pile of "gotchas to be
aware of when writing shell scripts", but I also don't think it
invalidates using set -e in general.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v