theme/brainy: Update sudo check method

This commit is contained in:
David Farrell
2020-03-31 14:11:05 -07:00
parent ca843e7b93
commit 1d6b01018d

View File

@@ -90,7 +90,7 @@ ____brainy_bottom() {
___brainy_prompt_user_info() { ___brainy_prompt_user_info() {
color=$bold_blue color=$bold_blue
if [ "${THEME_SHOW_SUDO}" == "true" ]; then if [ "${THEME_SHOW_SUDO}" == "true" ]; then
if [ $(sudo -n id -u 2>&1 | grep 0) ]; then if sudo -vn 1>/dev/null 2>&1; then
color=$bold_red color=$bold_red
fi fi
fi fi