HCoop
/
jackhill
/
guix
/
guix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a517a0
)
guix-install.sh: Gracefully fail on | bash.
author
Tobias Geerinckx-Rice
<me@tobias.gr>
Sun, 11 Dec 2022 00:00:00 +0000
(
01:00
+0100)
committer
Tobias Geerinckx-Rice
<me@tobias.gr>
Sun, 11 Dec 2022 00:00:00 +0000
(
01:00
+0100)
* etc/guix-install.sh (welcome): Print an error message and a hint if
the first read fails.
etc/guix-install.sh
patch
|
blob
|
blame
|
history
diff --git
a/etc/guix-install.sh
b/etc/guix-install.sh
index
fb9006b
..
f008593
100755
(executable)
--- a/
etc/guix-install.sh
+++ b/
etc/guix-install.sh
@@
-615,7
+615,10
@@
https://www.gnu.org/software/guix/
EOF
# 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 ! read -r char; then
+ echo
+ die "Can't read standard input. Hint: don't pipe scripts into a shell."
+ fi
if [ "$char" ]; then
echo
echo "...that ($char) was not a return!"