mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
themes/powerline: Avoid using non-POSIX uptime
This commit is contained in:
@@ -19,7 +19,8 @@ function __powerline_user_info_prompt {
|
||||
local color=${USER_INFO_THEME_PROMPT_COLOR}
|
||||
|
||||
if [[ "${THEME_CHECK_SUDO}" = true ]]; then
|
||||
if sudo -n uptime 2>&1 | grep -q "load"; then
|
||||
# check whether sudo is active for no-password executions
|
||||
if sudo -n cat <<< c3bcc5c 2>&1 | grep -q c3bcc5c; then
|
||||
color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user