From 90624664f474e044784aafda5b97f5380880d29c Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Thu, 5 Jun 2025 16:33:34 -0400 Subject: [PATCH] fix: ensure interactive terminal requirement for installation script --- install_adventurelog.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install_adventurelog.sh b/install_adventurelog.sh index b149f25..bd14ad0 100755 --- a/install_adventurelog.sh +++ b/install_adventurelog.sh @@ -782,6 +782,12 @@ main() { } # Script entry point -if [[ "${BASH_SOURCE[0]:-}" == "$0" ]] || [ -p /dev/stdin ]; then +# Allow interactive install even when piped +if [[ -t 1 ]]; then + # stdout is a terminal → likely interactive + exec < /dev/tty # reconnect stdin to terminal for user input main "$@" -fi \ No newline at end of file +else + echo "Error: This script needs an interactive terminal." >&2 + exit 1 +fi