[bug#33134,1/5] guix-install.sh: Update welcome.

Message ID 20181103011034.70086-1-s@ricketyspace.net
State New
Headers show
Series
  • Add auto yes/no switch to guix-install.sh
Related show

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

rsiddharth Nov. 3, 2018, 1:10 a.m. UTC
* etc/guix-install.sh (welcome): Read exactly one character from input.
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Danny Milosavljevic Nov. 6, 2018, 11:32 a.m. UTC | #1
On Fri,  2 Nov 2018 21:10:34 -0400
rsiddharth <s@ricketyspace.net> wrote:

> * etc/guix-install.sh (welcome): Read exactly one character from input.
> ---
>  etc/guix-install.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index ca6874ba0..cf839c20e 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -398,7 +398,7 @@ This script installs GNU Guix on your system
>  https://www.gnu.org/software/guix/
>  EOF
>      echo -n "Press return to continue..."
> -    read -r  ANSWER
> +    read -N 1 -r  ANSWER

While it's nice for the interactive user, doesn't this break

  yes | ./guix-install.sh

because now it doesn't wait for the newline?

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ca6874ba0..cf839c20e 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -398,7 +398,7 @@  This script installs GNU Guix on your system
 https://www.gnu.org/software/guix/
 EOF
     echo -n "Press return to continue..."
-    read -r  ANSWER
+    read -N 1 -r  ANSWER
 }
 
 main()