feat: reopen stdin from terminal when script is piped
This commit is contained in:
@@ -970,6 +970,11 @@ trap cleanup INT TERM
|
||||
# ── Main ────────────────────────────────────────────────────────────────────
|
||||
|
||||
main() {
|
||||
# When piped (e.g. curl | bash), reopen stdin from the terminal
|
||||
if [[ ! -t 0 ]]; then
|
||||
exec < /dev/tty
|
||||
fi
|
||||
|
||||
# Check for minimum terminal size
|
||||
get_term_size
|
||||
if [[ $TERM_COLS -lt 60 || $TERM_ROWS -lt 20 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user