From 2a4a3a15acd389f3c7b941bdac599caa66010ef2 Mon Sep 17 00:00:00 2001 From: Timothy Hofland Date: Sun, 15 Mar 2026 17:13:05 +0100 Subject: [PATCH] fix: install whiptail if not present for interactive prompts in setup script --- scripts/setup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index ffad08e..e37e6f5 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -24,6 +24,17 @@ if [ "$(id -u)" -ne 0 ]; then exit 1 fi +# Ensure interactive prompt tooling is available +if ! command -v whiptail > /dev/null 2>&1; then + echo "Installing whiptail for interactive prompts..." + if command -v apt-get > /dev/null 2>&1; then + apt-get update -y + DEBIAN_FRONTEND=noninteractive apt-get install -y whiptail + elif command -v pacman > /dev/null 2>&1; then + pacman -S --noconfirm whiptail + fi +fi + # Detect user REAL_USER=${SUDO_USER:-$(logname)} REAL_HOME=$(eval echo "~$REAL_USER")