fix: sudo check

This commit is contained in:
Martin Hanzlowsky
2026-03-30 21:31:11 +02:00
parent b4a57bbbec
commit ba2da84e7b
+2 -2
View File
@@ -98,7 +98,7 @@ function sudo_init_keepalive(){
# Prompt for sudo password once at the beginning
echo -e "${STY_CYAN}[$0]: Requesting sudo privileges for installation...${STY_RST}"
if ! sudo -v; then
if ! sudo true; then
echo -e "${STY_RED}[$0]: Failed to obtain sudo privileges. Aborting...${STY_RST}"
exit 1
fi
@@ -108,7 +108,7 @@ function sudo_init_keepalive(){
(
while true; do
sleep 60
sudo -v 2>/dev/null || exit 0
sudo true 2>/dev/null || exit 0
done
) &
SUDO_KEEPALIVE_PID=$!