From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25899 invoked by alias); 27 Aug 2017 01:00:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41605 Received: (qmail 27608 invoked by uid 1010); 27 Aug 2017 01:00:05 -0000 X-Qmail-Scanner-Diagnostics: from ioooi.vinc17.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(92.243.22.117):SA:0(-1.9/5.0):. Processed in 3.166565 secs); 27 Aug 2017 01:00:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: vincent@vinc17.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Date: Sun, 27 Aug 2017 02:50:40 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: "set -e" handling is broken with zsh 5.3.1 and 5.4.1 Message-ID: <20170827005040.GA12622@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.8.3-7137-vl-r99863 (2017-08-22) Consider: ---------------------------------------- #!/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 ---------------------------------------- With zsh 5.3.1-4+b1 under Debian/stretch zsh 5.4.1-1 under Debian/unstable I get: % ./cond2-e; echo $? Fail 1 Fail 2 1 I suppose that cond2-e should die just after f is called, before outputting anything. At least, the behavior is not consistent. zsh 5.0.7 was outputting: Fail 1 Fail 2 Fail 3 but I suppose that this was incorrect (different from what other shells give on similar POSIX code). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)