1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

Extra case for ERR_RETURN and ERR_EXIT.

Don't trigger just because status is non-zero at end of
complex shell construct as this may be a case we've already
suppressed.
This commit is contained in:
Peter Stephenson 2016-12-05 11:21:01 +00:00
parent f71de84f1d
commit c03228f9ed
5 changed files with 92 additions and 1 deletions

View file

@ -208,6 +208,7 @@ execfor(Estate state, int do_exec)
loops--;
simple_pline = old_simple_pline;
state->pc = end;
this_noerrexit = 1;
return lastval;
}
@ -335,6 +336,7 @@ execselect(Estate state, UNUSED(int do_exec))
loops--;
simple_pline = old_simple_pline;
state->pc = end;
this_noerrexit = 1;
return lastval;
}
@ -472,6 +474,7 @@ execwhile(Estate state, UNUSED(int do_exec))
popheap();
loops--;
state->pc = end;
this_noerrexit = 1;
return lastval;
}
@ -523,6 +526,7 @@ execrepeat(Estate state, UNUSED(int do_exec))
loops--;
simple_pline = old_simple_pline;
state->pc = end;
this_noerrexit = 1;
return lastval;
}
@ -573,6 +577,7 @@ execif(Estate state, int do_exec)
lastval = 0;
}
state->pc = end;
this_noerrexit = 1;
return lastval;
}
@ -682,6 +687,7 @@ execcase(Estate state, int do_exec)
if (!anypatok)
lastval = 0;
this_noerrexit = 1;
return lastval;
}