Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/curl-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ fi

cd "$HOME"/.dotfiles || exit

exec ./install.sh
# Reconnect stdin to the terminal so interactive prompts work correctly.
# When running via `bash <(curl ...)`, stdin may be the process substitution
# pipe rather than the terminal, causing read/select to receive EOF immediately.
if [ -t 0 ]; then
exec ./install.sh
else
exec ./install.sh < /dev/tty
fi
8 changes: 8 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
# Exit on error, undefined variables, and pipe failures
set -euo pipefail

# Reconnect stdin to the terminal if it is not already a TTY.
# This is needed when the script is invoked via `bash <(curl ...)` where
# stdin may be the process substitution pipe instead of the terminal,
# causing interactive read/select calls to receive EOF immediately.
if [ ! -t 0 ] && [ -c /dev/tty ]; then
exec < /dev/tty
fi

###########################################
# GLOBAL VARIABLES
###########################################
Expand Down
Loading