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
- X-seq: zsh-workers 41606
 
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxx
 
- Subject: Re: "set -e" handling is broken with zsh 5.3.1 and 5.4.1
 
- Date: Sun, 27 Aug 2017 01:30:34 +0000
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=	daniel.shahaf.name; h=content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=A/d50q	kvkBTKyr+wxOVfHtCr320j/HJY8Afu8enxjGE=; b=rTSrI/P31p/EUi0ZwYe9vC	59wMJHvTlDWbxJ5I6amCUdk/ZYqvGrAyN4HrK+7gzdVVrtTo5hT2csiyY2YUD/gk	6UMg6mS5nDk2OlvCYD7C7S4Ro4G9AVV/6sLhRoSerd9ehy3c55J0BnLZXkyPpj6Z	YDv894F9E+xRSshEnNzpwN1F8JFpGfssEZc2Yn3XyjkY64OPxtZHW8QirQfKIqOx	DyTDAGQC+jZ0FKQ0Y6nhh4DwKSL4fro6i/AjkzpIzIF+7vccMr0UqKH+UJ9mJAzB	9EL6LbYdtx6EnzHDpWWiBTko1DO20LpZjMHr9wCI5KPghVJAReB45doLEkVmtI6Q	==
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=	messagingengine.com; h=content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=A/d50q	kvkBTKyr+wxOVfHtCr320j/HJY8Afu8enxjGE=; b=aOGe+BhwDDDNYQnJnO/a1j	DtgaQ31IpAx+CaTrRJCzdu5MUWfEzxJTPOACrIoL5mKOg8cRBdc+QazoY66GAz+B	B8Gp3spJhB/tgs4grehpigBCaMlnEIOMinIdiFpXpuI2ZR/YGgk2Iib2joUiBllu	gwKVusdSbk1ur6iV3sRYYGJxnjD3/j0InWsRttbyCsLKcUodnUCtXVA8/S2DMQUv	/m1X4qXdXGblUnrbS8rsgR7AHvJvFOxYfYz2SeofjxsNncJNNqmJJ3S8wtRSeLjV	URlpbjOa6vDDPT34qbELr2TQq6fTPc42ITl/Q5mUeBgU6GRWkFJMR2mUSb0MLoJw	==
 
- In-reply-to: <20170827005040.GA12622@zira.vinc17.org>
 
- List-help: <mailto:zsh-workers-help@zsh.org>
 
- List-id: Zsh Workers List <zsh-workers.zsh.org>
 
- List-post: <mailto:zsh-workers@zsh.org>
 
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
 
- References: <20170827005040.GA12622@zira.vinc17.org>
 
Vincent Lefevre wrote on Sun, 27 Aug 2017 02:50 +0200:
> ----------------------------------------
> #!/usr/bin/env zsh
> 
> set -e
> 
> f()
> {
>   [[ -z 1 ]] && false
> }
> 
> if false; then
>   :
> else
>   f
>   echo Fail 1
>   echo Fail 2
>   f
>   echo Fail 3
> fi
> ----------------------------------------
> 
> I suppose that cond2-e should die just after f is called, before
> outputting anything. At least, the behavior is not consistent.
That's what happens if [[ is changed to [, or put into a subshell.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author