On Tue, Aug 11, 2015 at 11:42:29AM +0000, PRC wrote:
> mybuild()
> {
> (
> set -e
> make
> echo "build okay"
> )
> }
>
> mybuild && do_other_stuff
http://mywiki.wooledge.org/BashFAQ/105
Since mybuild is invoked as part of a compound command, set -e is
suppressed. I guess this applies not only to set -e that's invoked
beforehand, but even to set -e that's set within the compound command.
Stop using set -e and all of these problems simply go away.
mybuild() {
make && echo "build okay"
}
mybuild && do_other_stuff