Fix sudo test

This commit is contained in:
Thomas Forgione 2019-04-17 16:48:22 +02:00
parent 09cedacbab
commit ed22dde744
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 2 additions and 9 deletions

View File

@ -170,15 +170,8 @@ main() {
configure_zsh configure_zsh
} }
sudoresult=$(sudo -nv 2>&1) sudo -n -l true 2>&1
sudo_available=$?
if [ $? -eq 0 ]; then
sudo_available=1
elif echo $sudoresult | grep -q '^sudo:'; then
sudo_available=0
else
sudo_available=1
fi
main < /dev/tty main < /dev/tty