Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: err_exit/err_return regression



On 29/09/15 at 07:54P, Peter Stephenson wrote:
> On Tue, 29 Sep 2015 17:43:27 +0200
> Joshua Krusell <js.shirin@xxxxxxxxx> wrote:
> > Heads up, found another edge case probably related to this.
> > 
> > The following snippet will never reach the print statement. I can only
> > reproduce this with a nested [[ followed by a var assignment.
> 
> Looks like there's another ingredient here since I don't see this with
> the current contents of the master branch.
> 
> pws

Was in a hurry and didn't provide much context, but that was with zsh
5.1.1. I just checked out master and I'm still getting the same results
on both OSX and Linux. Can provide output of `./configure` but suffice
to say just doing a default build (`reporter` is also pretty boring
http://pastebin.com/QaCh869w).

$ cat ex.sh
setopt err_return

print $ZSH_VERSION
setopt

if false; then
    :
else
    if [[ -n '' ]]; then
        a=2
    fi

    print foo
fi
$ env -i Src/zsh -f ex.sh
5.1.1-dev-0
errreturn
nohashdirs
norcs

Any other info I can provide?

/jsks



Messages sorted by: Reverse Date, Date, Thread, Author