mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 12:59:36 +02:00
fix: ensure interactive terminal requirement for installation script
This commit is contained in:
parent
5f9d0cd207
commit
90624664f4
1 changed files with 8 additions and 2 deletions
|
@ -782,6 +782,12 @@ main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Script entry point
|
# 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 "$@"
|
main "$@"
|
||||||
|
else
|
||||||
|
echo "Error: This script needs an interactive terminal." >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue