From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 13:17:50 2022 Received: (at submit) by debbugs.gnu.org; 14 Dec 2022 18:17:50 +0000 Received: from localhost ([127.0.0.1]:40786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5WKE-00068o-2k for submit@debbugs.gnu.org; Wed, 14 Dec 2022 13:17:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:44776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5WKB-00068i-Dr for submit@debbugs.gnu.org; Wed, 14 Dec 2022 13:17:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5WKB-0000V0-9Q for guix-patches@gnu.org; Wed, 14 Dec 2022 13:17:47 -0500 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5WK9-0003EZ-Lc for guix-patches@gnu.org; Wed, 14 Dec 2022 13:17:47 -0500 Received: by mail-qt1-x831.google.com with SMTP id c7so3138553qtw.8 for ; Wed, 14 Dec 2022 10:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=N3O5yoMWfCq4+RuSkSbTsCwToRoFDvtSI0ksz7f4p1Y=; b=fA75nu5uT0pbo11/BmQEVQQqwM5CgfhyRsRJzRpnoICWmALvx3CZfwj77uL3yF9q/P aLpqm6WkZX9PZdjhZWvNeJR4tsMozUMQ2I+RkyCTBaqfBKxf/3+bk0++54GqAsg8yM1K 6/8/0dEpm3CYdIQUba3FLKPwMpaxo/o0ZmM8pp70AAPvQCL3TfTh+eIBry/nXO+O/QlJ bpda+We6dmPAZNIp7jjmzA6XWLS9V8SrgWMph2yV/Ge+qQZwJnVpu23sBLZNHP7xD7Oe EBws7Icn4/z4wzyP9UC/b0blHVEMrNr8YqyElQUdC/Rtn9vAnI7mZZL4ub5m+LXJKIoY n6yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=N3O5yoMWfCq4+RuSkSbTsCwToRoFDvtSI0ksz7f4p1Y=; b=C0VnObTN8DbjHxq7U6Emur+VMrBPjNunkqAAsHtpjjRbwRGtcOUhyI3SnlSEc4RWmQ LMIRtUuDCFRSE92Kbqf3XfbQHM7fPINWX3VdxAKQ2GWFqJs9cSd15D3lvsa24Gi9oKU8 8b78maevtwzkiTFS4hKbp4YmxfL0fHCZtyoc5XKYRyvxuq+mpyVwSbmBabbcQCzvlviK cUOYFNzXPeKgRnGJ4PIMaVZTwIzcgu4mimy2GxoEX8Vl+VhgpXUQ1EOB8TAAsa3Ft6UR AjWldT25SXSFATMwTXe8CWNz1TRrxvcEHOXx3CLONT0W2wdd4cIaZxU4YIy8Q7HvC+hh 4qMA== X-Gm-Message-State: ANoB5pmnxHYqUuSbSTvUg2WKKWjO8Rh21Xugv1hac8LMhlefMb1hZ7rn mrOjeATs2v48kpG46ONC2fKQBSHPM9EwSQ== X-Google-Smtp-Source: AA0mqf6fqqSFxCaMCnVhxXn9Hl8DAzz7TNBRs+SQSgmZPy2orbjFDORzVISHFL6ilgI9LG0hZy7Lpg== X-Received: by 2002:ac8:6042:0:b0:3a8:12be:4136 with SMTP id k2-20020ac86042000000b003a812be4136mr11029521qtm.8.1671041864372; Wed, 14 Dec 2022 10:17:44 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id h9-20020ac81389000000b003a7ef7a758dsm2020260qtj.59.2022.12.14.10.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 10:17:43 -0800 (PST) From: Maxim Cournoyer To: Tobias Geerinckx-Rice Subject: Re: [bug#60069] [PATCH 2/2] guix-install.sh: Directly exit in case of errors in chk_require. References: <20221214155603.29381-1-maxim.cournoyer@gmail.com> <20221214155603.29381-2-maxim.cournoyer@gmail.com> <871qp2c54w.fsf@nckx> Date: Wed, 14 Dec 2022 13:17:42 -0500 In-Reply-To: <871qp2c54w.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 14 Dec 2022 17:37:19 +0100") Message-ID: <875yed4zp5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::831; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x831.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 60069@debbugs.gnu.org, guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Tobias, Tobias Geerinckx-Rice writes: > Maxim Cournoyer =E5=86=99=E9=81=93=EF=BC=9A >> - [ "${#warn}" -ne 0 ] && >> - { _err "${ERR}Missing commands: ${warn[*]}."; >> - return 1; } >> - + [ "${#warn}" -ne 0 ] && die "Missing commands: >> ${warn[*]}." >> + > > I did not run this, but will it not itself trigger -e when the test > is false? This apparently falls in the special casing by Bash of what is considered a failure when using 'set -e'; here's a test: --8<---------------cut here---------------start------------->8--- $ cat test.sh #!/usr/bin/env bash set -e [ false ] && echo "hey, we made it!" --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ ./test.sh hey, we made it! --8<---------------cut here---------------end--------------->8--- I hope this answers your question. --=20 Thanks, Maxim