Subject: [bug#33134] [PATCH 0/1] guix-install.sh: Add ability to run it non-interactively.

From: Tobias Geerinckx-Rice <[email-masked]>
Date: Wed, 24 Oct 2018 15:24:03 +0200

rsiddharth, Efraim,

Efraim Flashner wrote:
> On Tue, Oct 23, 2018 at 08:15:42PM -0400, rsiddharth wrote:
>> I want to be able to run the guix-install.sh 
>> non-interactively[1] like this:
>> 
>>    echo "yy" | guix-install.sh
>> 
>>    (One "y" for "Press return to continue..." prompt, the other 
>>    "y" for
>>    "Permit downloading pre-built package binaries from the 
>>    project's build
>>    farms? (yes/no)" prompt).
>> 
>> Currently, the `read` in welcome function reads both the "y". I 
>> updated it to
>> read just one character.
>> 
>
> would this work? echo "y\ny" | guix-install.sh

Not quite, but

  $ echo -e "y\ny" | guix-install.sh

will. Or the more conventional

  $ yes | guix-install.sh # untested

providing guix-install.sh doesn't choke on that infinite stream of 
"y"s. Which it might, and even if it doesn't now, there's no 
guarantee that this dirty hack won't break the future.

If this is something we want to support, it could be done more 
better through a '--non-interactive' or '--force' flag that skips 
these and any future prompts at the source.

Non?

T G-R