From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 10ec4bc1 for ; Sat, 1 Feb 2020 17:57:27 +0000 (UTC) Received: (qmail 373 invoked by alias); 1 Feb 2020 17:57:22 -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: List-Unsubscribe: X-Seq: 45371 Received: (qmail 16259 invoked by uid 1010); 1 Feb 2020 17:57:22 -0000 X-Qmail-Scanner-Diagnostics: from relay2-d.mail.gandi.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25703. spamassassin: 3.4.2. Clear:RC:0(217.70.183.194):SA:0(-2.6/5.0):. Processed in 1.768163 secs); 01 Feb 2020 17:57:22 -0000 X-Envelope-From: stephane@chazelas.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _nblcust.gandi.net designates 217.70.183.194 as permitted sender) X-Originating-IP: 2.127.75.28 Date: Sat, 1 Feb 2020 17:56:36 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: [bug] errexit and cmdsubst after "else" Message-ID: <20200201175636.u4drsthh574p5cia@chazelas.org> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 From https://unix.stackexchange.com/questions/565158/command-substitution-does-not-respect-err-exit-sometimes $ zsh -ec 'if false; then;else a=$(false); echo $?; fi' 1 expected no output because of errexit. That seems to be regression. @Gilles there bisected it to https://sourceforge.net/p/zsh/code/ci/b581c3fece76c87ed86ae9fc704d0fcf208a79d3/ Which seemed to be a fix for a similar bug or regression: http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=36766 https://www.zsh.org/mla/workers/2015/msg02685.html Possibly incomplete. -- Stephane