Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT)
- X-seq: zsh-workers 50929
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT)
- Date: Wed, 9 Nov 2022 21:47:03 -0800
- Archived-at: <https://zsh.org/workers/50929>
- In-reply-to: <CAH+w=7ZA_TFKfMn6GYwX4HMB8LFUy42kgp+x0iaZE8yLMC0AoQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Z0zT8Lq5BKe4M-JzdjOYhQsmnHJZTVQ7V5+wLBd5u=zA@mail.gmail.com> <CAH+w=7ZA_TFKfMn6GYwX4HMB8LFUy42kgp+x0iaZE8yLMC0AoQ@mail.gmail.com>
On Wed, Nov 9, 2022 at 9:22 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> Grateful for the thorough regression tests in E01options, too.
Of course I still missed one detail ... ERR_RETURN only applies inside
functions.
diff --git a/Src/exec.c b/Src/exec.c
index eef40232e..ce0c1f1ad 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1442,7 +1442,7 @@ execlist(Estate state, int dont_change_job, int exiting)
execsimple(state);
else
execpline(state, code, ltype, (ltype & Z_END) && exiting);
- if (unset(ERRRETURN))
+ if (!locallevel || unset(ERRRETURN))
this_noerrexit = noerrexit;
state->pc = next;
goto sublist_done;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author