Skip to content

Commit

Permalink
Fix to properly adapt to all terminal sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Dec 23, 2024
1 parent 33715fe commit 859054e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -832,12 +832,16 @@ install_msg() {
changes (use the "virtualmin change-license" command).
EOF
if [ "$skipyesno" -ne 1 ]; then
printf " Continue? (y/n) "
if ! yesno; then
exit
fi
echo
screen_height=$(tput lines 2>/dev/null || echo 0)
# Check if screen height can fit the message entirely
if { [ "$screen_height" -gt 0 ] &&
[ "$screen_height" -lt 33 ]; } ||
[ "$screen_height" -eq 0 ]; then
printf " Continue? (y/n) "
if ! yesno; then
exit
fi
echo
fi
cat <<EOF
The systems currently supported by the install script are:
Expand Down

0 comments on commit 859054e

Please sign in to comment.