mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
fix: sudo check
This commit is contained in:
@@ -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=$!
|
||||
|
||||
Reference in New Issue
Block a user