mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 09:41:44 +02:00
33791: fatal errors in an "always" construct yield nonzero status
Fatal errors in the try-block part of an "always" construct cause the entire construct to have nonzero status, even when TRY_BLOCK_ERROR is used to suppress the error.
This commit is contained in:
parent
1fec267156
commit
05e919dc56
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2014-11-25 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 33791: Src/loop.c: fatal errors in the try-block part of an
|
||||
"always" construct cause the entire construct to have nonzero
|
||||
status, even when TRY_BLOCK_ERROR is used to suppress the error.
|
||||
|
||||
2014-11-24 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Daniel Hahler: 33746: Doc/Zsh/builtins.yo: read -q refers to -t.
|
||||
|
|
|
@ -659,8 +659,9 @@ exectry(Estate state, int do_exec)
|
|||
|
||||
try_tryflag = save_try_tryflag;
|
||||
|
||||
/* Don't record errflag here, may be reset. */
|
||||
endval = lastval;
|
||||
/* Don't record errflag here, may be reset. However, */
|
||||
/* endval should show failure when there is an error. */
|
||||
endval = lastval ? lastval : errflag;
|
||||
|
||||
freeheap();
|
||||
|
||||
|
|
Loading…
Reference in a new issue