From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uFlACIXERWN7lwAAbAwnHQ (envelope-from ) for ; Tue, 11 Oct 2022 21:31:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iCVKCIXERWP6DwAAauVa8A (envelope-from ) for ; Tue, 11 Oct 2022 21:31:17 +0200 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 DC94C12B63 for ; Tue, 11 Oct 2022 21:31:16 +0200 (CEST) Received: from localhost ([::1]:33300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiKyB-0001cZ-Vz for larch@yhetil.org; Tue, 11 Oct 2022 15:31:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiKwx-0001ap-KL for guix-devel@gnu.org; Tue, 11 Oct 2022 15:30:00 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:43589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiKwv-0005zS-Sv for guix-devel@gnu.org; Tue, 11 Oct 2022 15:29:59 -0400 Received: by mail-qk1-x72b.google.com with SMTP id o2so1972999qkk.10 for ; Tue, 11 Oct 2022 12:29:57 -0700 (PDT) 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=oixozwuhjH6wxldeo1xaDzlqrPnw5wJ622u8ITLu01Q=; b=L8FV1KmfveFlM2L7O5JQo+F6vX33k99nJpHO4GmGWUF3zA4+nnWM5mW2YIviGDYFNw XRGuJ9DUCtlkyMsnUM9nMq6eO054S1f83YY4WrpVEl3MCO/zPf2f09iMBoM5weh1AVY3 xgdVWck3RxrkGxAzdkVas5ZzmKAiuHN7fs8VbzKRmr019HkpLukF1eg8nBzIJ0ZjlmRF FO98mD9o7zFjUSLFAMMBGAEaPbgTbro/5lw+GCNECysBETe0Uw9yC0EvCWpfwAJvmB/K /67CiE8n3t5iNzGEbNv1ZgpHW/nthSf7JdHauEQXjtg9vSAvqG3Vi9fh0byBy5XnslFd jpqw== 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=oixozwuhjH6wxldeo1xaDzlqrPnw5wJ622u8ITLu01Q=; b=2BM+8Snp13pSTF4HE8KZ4vulRVW3GSyddo5Za4LGFcQpKuc1pcj+Du5RHxg31i4OU8 QH4gGpjBBmlgAvb4LrTVO39W1H2CLmUx5OtZm4xZAUh47JVnY/3Bk6rtzq0qd5dft4Kk 385AOVGaXoFqg7LhSeVEwJYJmFGLM+v9uQqfPBeoJbEJt8cMEzAP/obl7WsDm3NgkqnK jQewYR6tCrYS9UGAqU9ICLjfP1gwlNnIG1buK0lk6BUyiuut4aAc42zIXXOBq+xpKxnR 1pgubyP2mS27daFg3Rhhc7bXXtMtKI2dz0a9uW7BvvdGpk9azrf9DrwoStYW2lan/ivj ABkQ== X-Gm-Message-State: ACrzQf37wiA/EvCwK6ulzhc/y9kvcUyfnJYwD1E5ubtXbwlAcyz5dsgX d6e7HhlYhkgFiTejr/4LMx+X4xpjg1s= X-Google-Smtp-Source: AMsMyM6pSwCOHsCayn6H8z+gxv6n5SEKu/HFTUoUctxrY89uT7UotSWgRB2+PD5PoVl2zYkQ1v2xuA== X-Received: by 2002:a05:620a:25c8:b0:6ae:be73:86c6 with SMTP id y8-20020a05620a25c800b006aebe7386c6mr17135471qko.531.1665516596310; Tue, 11 Oct 2022 12:29:56 -0700 (PDT) Received: from kwak ([70.50.251.9]) by smtp.gmail.com with ESMTPSA id q4-20020a05620a2a4400b006ee74cc976esm3883510qkp.70.2022.10.11.12.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 12:29:55 -0700 (PDT) From: Maxim Cournoyer To: Tobias Geerinckx-Rice Cc: Jonas Freimuth , Guix-devel Subject: Re: bug#58417: Installer script no longer works with `yes` utility References: <9e3dc221-9013-d58a-402b-696b117a99a6@posteo.de> <8735buwbjl.fsf@nckx> Date: Tue, 11 Oct 2022 15:29:53 -0400 In-Reply-To: <8735buwbjl.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue, 11 Oct 2022 18:26:35 +0200") Message-ID: <87h70acg5q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (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::72b; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72b.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-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665516676; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=oixozwuhjH6wxldeo1xaDzlqrPnw5wJ622u8ITLu01Q=; b=I1PgDotYdFMr0Szpk4x3yiPBYDuzY0tb+Qpk4ONa5IB8dZlJFqntUHJlCbv1CcFTuQ8KQF ekXNMojoJVDieccp6wM9S18sEmZaRygj3jYI0NyWp+LjFNQDckzg+DNGAj+PNLCKfVRwRI rKw4BfkjwWnUkckHn2BQYVQbQhHDhFvndUqna7JAvMqG98HzRfb5QqDtX91tf5NKkpmymN CWJIZ4ZpdNeRcst8htW6Hls+/8RnKK629NW4WnSyOdPbKAd3DfiTIDTkW21P5g2LVTcdr2 KH/DEUmBW46ewwLPgdE7Y4MSa0mzTSbcp5Q5u2jdZ0TF2HF1hPAU0J8nLoeMkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665516676; a=rsa-sha256; cv=none; b=XipoAFMVAph18F5dyntoQuiP/XR1iPyVOzHqTW0l7TPOo8OTPV5PItuWzTdliRP2RrK804 erP/ay57ZjrNwrN3kwsQoRbNcqHQj7Sp34v6cIe6NmabbWm518bYkrrM7OUgZjqCwho2Te DDqYJpCaGCEvQYY7GT2O3kPZ7wtnd3C53Vs9l/V4cEQUjac2gAFRtCpg+w7JH81tpYPPwt oeu5x70qUMwGZy8d+uV5hGmzfv47gSAec8DPGGwwqwc3DQ4VuxBILRoCxV6TGrqpdcEPPi HLFgQhKSASL2d5imeQx29vTyjBVAuAkSR8uLNMiNNJ6AbsL82FTL+/9ssWFdvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=L8FV1Kmf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.39 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=L8FV1Kmf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DC94C12B63 X-Spam-Score: -2.39 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2ue9zH9h2QIH Hi, Tobias Geerinckx-Rice writes: > [Shunted to guix-devel@] > > Jonas Freimuth =E5=86=99=E9=81=93=EF=BC=9A >> bash -c 'yes | bash guix-install.sh' > > While this happens to work (again) now, that doesn't mean it always > will or should be considered supported. > > We should reserve the right to ask future questions to which the > safe/sane/common answer is =E2=80=98no=E2=80=99, without phrasing it awkw= ardly just to > make an unthinking stream of =E2=80=98y=E2=80=99s happy. > > $ guix-install.sh > =E2=80=A6 > Would you like to NOT enable the Cool Experimental Feature? > (DANGER) [Y/n] > > Conversely, I'd like to add a comment that does commit to always > keeping =E2=80=98yes '' | bash guix-install.sh=E2=80=99 working, assuming= there was no > other input or detected issues. Also nice for humans in a hurry. > > Does that seem unreasonable to anyone? To the contrary, that seems pretty reasonable. You may be interested in this version of a biased prompt, gracefully shared by Earnestly from #bash: --8<---------------cut here---------------start------------->8--- confirm() { local -l reply local prompt bias=3D$1 shift case $bias in yes) prompt=3DY/n ;; no) prompt=3Dy/N esac # shellcheck disable=3DSC2059 printf -- "\033[1m* $1 [$prompt]\033[0m " "${@:2}" read -r reply case $bias in yes) [[ $reply =3D y || ! $reply ]] ;; no) [[ $reply =3D y ]] esac } --8<---------------cut here---------------end--------------->8--- The first arguments is the default argument (yes or no). The rest works the same (but they used printf to format things). We can adapt our version with that. If you make the change you'll want to write a news so that 'yes' users can transition to "yes ''". --=20 Thanks, Maxim