Hi Chet,
On 10/16/2012 02:13 AM, Chet Ramey wrote:
On 10/15/12 11:23 AM, Nikolai Kondrashov wrote:
I've noticed that errexit is disabled inside command substitution.
Is this intentional?
Yes. It's been that way since bash-1.14. The reasons why are lost in
time -- it was 17 years ago, after all -- but probably go something like
not wanting the parent's settings to produce unexpected results in the
child process.
Well, there is nothing for it, then.
Current versions of bash disable -e inside command substitution only when
posix mode is not enabled.
I may need to learn more about posix mode, but so far I'm not inclined to use
it. So, will have to work this around.
Thank you.
Sincerely,
Nick