From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ePkKJGITmmORTQAAbAwnHQ (envelope-from ) for ; Wed, 14 Dec 2022 19:18:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wHYJJGITmmPgqAAA9RJhRA (envelope-from ) for ; Wed, 14 Dec 2022 19:18:10 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2B8591B195 for ; Wed, 14 Dec 2022 19:18:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5WKS-0000k5-Nk; Wed, 14 Dec 2022 13:18:04 -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 1p5WKQ-0000jg-RX for guix-patches@gnu.org; Wed, 14 Dec 2022 13:18:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5WKQ-0003Ht-Go for guix-patches@gnu.org; Wed, 14 Dec 2022 13:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5WKQ-00069Q-Cc for guix-patches@gnu.org; Wed, 14 Dec 2022 13:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60069] [PATCH 2/2] guix-install.sh: Directly exit in case of errors in chk_require. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60069 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 60069@debbugs.gnu.org X-Debbugs-Original-Cc: 60069@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 60069-submit@debbugs.gnu.org id=B60069.167104187323626 (code B ref 60069); Wed, 14 Dec 2022 18:18:02 +0000 Received: (at 60069) by debbugs.gnu.org; 14 Dec 2022 18:17:53 +0000 Received: from localhost ([127.0.0.1]:40789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5WKG-000690-QY for submit@debbugs.gnu.org; Wed, 14 Dec 2022 13:17:53 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:36588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5WKE-00068f-0d for 60069@debbugs.gnu.org; Wed, 14 Dec 2022 13:17:50 -0500 Received: by mail-qt1-f172.google.com with SMTP id fz10so3166276qtb.3 for <60069@debbugs.gnu.org>; Wed, 14 Dec 2022 10:17:50 -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=cURkpDW+dCEKpiqADf3YvHwtoQrd3ivI+x1O6mDM3oQLqKfEmvhbH+1aDHLqDrFJ8w m0ptFa7FR5nUDFemr4T6zReyk/RR+W/1DyVyavp2JeAjYMcpmALLqQrIDaxDJDwfLIE4 GPxRi/POHIvnHUyVevX79NelDRXhQGPzHVY0XoXRFVOLBpZOhXNVErxg4AesgqQxN2WJ gFJOh3sisHXztysYDoZKellHgIO+7Td59ijPUK7BtgnRDHCVvmkPnpUSedrav+ThD9hX uYWzs3UzNLReggZZNvQw8X1/otAA4XrPDvB8tPXvM4xhlhk9AsSEoF0P3JkLWtPDraP5 Hzww== X-Gm-Message-State: ANoB5pk2nzwgSpGhZdFiJ8LkoXLz8OkdhW7t6H8BKi5uyqrccYxiQ05O eMKv2voRM/bD5jLhleKGdLokOsJMMe+3Mw== 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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671041890; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=N3O5yoMWfCq4+RuSkSbTsCwToRoFDvtSI0ksz7f4p1Y=; b=qssD8JfR3SUwPHQx2fyQvUivUKLrtmMq29q739M64yMe88uwCY2ahcKaFdjetdNm7C1hMk 0GM+TGRJg8cDh3FwxGJR4mEFVzbXOTnA+dclSEbXX5WswQFTSbSQ3MVU/pxPYYZ8jzUEfj KIvrB64YReO1umsQ0C6dwpSde4pfmw52xf8mkvCdL5EOjY3dI6FpFMPw9ApUmvJ4cxre1w WHwV5995sf5m4UkSo6RmNXpg1v0zF+QUAzO7wK0cxr3uNG/0x7MD48JI67Klh23k41j8xV sHPlEvk0ZSXg3cJ9V6YHLZ5Ir/FwEr6XwjBWzCwe0oEsRMRtQ8msLKHuwu/Mqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fA75nu5u; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671041890; a=rsa-sha256; cv=none; b=XKvWKXm94IifV6dL8qs9uEyNcYmiIxtcNpAZ73oCE6fLB/+Uh7F3qMIqarRjjfMl0efjku 5or7VYcfcDNWtLEK9YL81zKezF57kvUJR29350dXJLGu4ruBg7liHGVooDugdf6dXsBB5H QFkI/1uhhV3H8YQrhNtZEuEqH0wsuJrbCZeKaBM7zEEbDx7Xrfj3VIo6cEbADWm7ZUMRQF S9sf9PTiqKDifZ+xDcB8ijBoWoAv4wAgIMWKcxPJfmY+BAN8bmEXZMARvhzFXoub+pL6i0 l9PmPWyX6hPFnX8O1Hc8qEzb95BCi6Pf/flyE8+LUhjr6Ox6A9NRT/R75ety+g== X-Migadu-Spam-Score: -1.87 X-Spam-Score: -1.87 X-Migadu-Queue-Id: 2B8591B195 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fA75nu5u; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: qGwekGhTjJV6 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