Skip to content

Commit

Permalink
Fix issues with detect-sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Sep 27, 2024
1 parent d551274 commit b4e6427
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script/detect-sudo/customize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from cmind import utils
import os, subprocess
import select
import sys

def preprocess(i):

Expand Down Expand Up @@ -45,7 +47,7 @@ def prompt_sudo():
while True:
try:
r = subprocess.check_output(["sudo", "-p", msg, "echo", "Check sudo"],
stderr=subprocess.STDOUT, timeout=5)
stderr=subprocess.STDOUT, timeout=20)
print(r.decode('utf-8')) # Decode bytes to string
return 0
except subprocess.TimeoutExpired:
Expand Down

0 comments on commit b4e6427

Please sign in to comment.