Suggestion verification root user

I a problem, the group maintenance receives at all times messages when I launches orders.
It is better check if the user is root with "id" commande.
pull/1149/head
Quentinix 2018-02-19 17:58:02 +01:00 committed by GitHub
parent 671cd35a3b
commit 26ba7b4423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ function __powerline_user_info_prompt {
local color=${USER_INFO_THEME_PROMPT_COLOR} local color=${USER_INFO_THEME_PROMPT_COLOR}
if [[ "${THEME_CHECK_SUDO}" = true ]]; then if [[ "${THEME_CHECK_SUDO}" = true ]]; then
if sudo -n uptime 2>&1 | grep -q "load"; then if id 2>&1 | grep -q "root"; then
color=${USER_INFO_THEME_PROMPT_COLOR_SUDO} color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
fi fi
fi fi