summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-10-16 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-10-16 02:00:29 +0200
commit0d2ad16c0714ce62949ef39db673aa2b607c41e3 (patch)
tree276f6e6aea00186c0cdafc6dd8c3d1b98b4dff0d
parenta326e3085da451c82ea461116ea1f59318f0f81d (diff)
downloadguix-0d2ad16c0714ce62949ef39db673aa2b607c41e3.tar.gz
guix-install.sh: Cosmetically tweak non-interactive output.
Avoid printing

  Press return to continue...[1666352494.051]: Starting installation…
  [1666352648.869]: …

when the return itself wasn't echoed on the console.

* etc/guix-install.sh (welcome): Add a carriage return to the prompt,
so that the next line of output may overwrite it.
-rwxr-xr-xetc/guix-install.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 152accef77..c8ef59d4a4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -607,7 +607,8 @@ This script installs GNU Guix on your system
 
 https://www.gnu.org/software/guix/
 EOF
-    echo -n "Press return to continue..."
+    # Don't use ‘read -p’ here!  It won't display when run non-interactively.
+    echo -n "Press return to continue..."$'\r'
     read -r char
     if [ "$char" ]; then
 	echo