Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Yet another errexit bug?
- X-seq: zsh-workers 53097
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Yet another errexit bug?
- Date: Fri, 20 Sep 2024 11:05:32 -0700
- Archived-at: <https://zsh.org/workers/53097>
- List-id: <zsh-workers.zsh.org>
I thought we'd squashed all of these, but:
% ! ( setopt errexit; false; print notreached )
notreached
% print $?
1
Compare bash:
$ ! ( set -e; false; echo notreached; )
$ echo $?
0
Zsh still leaking "noerrexit" into subshells, I guess?
Curiously however, bash (5.0.17):
$ ( set -e; false; echo notreached; ) && echo here
notreached
here
So bash is treating a subshell in AND/OR as different than subshell
preceded by NOT? Zsh matches bash in the AND case, so maybe zsh's NOT
behavior is actually more consistent?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author