From 1d6b01018d5227ea52a86c1d29767f139efd781c Mon Sep 17 00:00:00 2001 From: David Farrell Date: Tue, 31 Mar 2020 14:11:05 -0700 Subject: [PATCH] theme/brainy: Update sudo check method --- themes/brainy/brainy.theme.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/brainy/brainy.theme.bash b/themes/brainy/brainy.theme.bash index e78128aa..e27d9d80 100644 --- a/themes/brainy/brainy.theme.bash +++ b/themes/brainy/brainy.theme.bash @@ -90,7 +90,7 @@ ____brainy_bottom() { ___brainy_prompt_user_info() { color=$bold_blue 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 fi fi