mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-12-23 22:58:17 -05:00
fix: ensure interactive terminal requirement for installation script
This commit is contained in:
@@ -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
|
||||
else
|
||||
echo "Error: This script needs an interactive terminal." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user