Greg, I agree with you 100%. Not trying to fix errexit behavior. The new errfail (if accepted) will provide better error handling (via opt-in) without breaking existing code.
Yair. Sent from my iPad > On Jul 4, 2022, at 10:00 PM, bug-bash-requ...@gnu.org wrote: > > From: Greg Wooledge <g...@wooledge.org> > To: bug-bash@gnu.org > Subject: Re: Revisiting Error handling (errexit) > Message-ID: <YsM1U//qssfqx...@wooledge.org> > Content-Type: text/plain; charset=us-ascii > >> On Mon, Jul 04, 2022 at 09:33:28PM +0300, Yair Lenga wrote: >> Thanks for taking the time to review my post. I do not want to start a >> thread about the problems with ERREXIT. Instead, I'm trying to advocate for >> a minimal solution. > > Oh? Then I have excellent news. The minimal solution for dealing with > the insurmountable problems of errexit is: do not use errexit. > > It exists only because POSIX mandates it. And POSIX mandates it only > because it has been used historically, and historical script would > break if it were to be removed or changed.