Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "set -e" handling is broken with zsh 5.3.1 and 5.4.1



On 2017-08-27 19:56:48 +0100, Peter Stephenson wrote:
> This appears to have been deliberate, in that after "if" we usually
> restore noerrexit beahaviour on the first thing we execute, but if it's
> a function we don't.  However, I can't for the life of me work out why I
> made that exeception --- certainly nothing goes wrong in the tests if I
> apply the following, and I would expect to be testing whatever it was
> made me think we needed the qualification.  It might have been to do
> with empty functions, but making f empty, so it runs but doesn't change
> the status, doesn't seem to do anything unexpected (we shouldn't
> and don't exit).

Perhaps it was needed in the past, and no longer makes sense now.
Have you looked at the diff that introduced it, the corresponding
commit log and the discussions that occurred at that time?

BTW, if it was added for some purpose, a test should have been added
at the same time to make it fail if this condition was not there.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author