disregard escalation tool variable if found as root

This commit is contained in:
nnyyxxxx 2024-11-08 02:25:35 -05:00
parent 06453fabe9
commit 96f7fa6528
No known key found for this signature in database
GPG Key ID: 6038FFD6589902CB

View File

@ -84,7 +84,13 @@ checkAURHelper() {
}
checkEscalationTool() {
## Check for escalation tools.
if [ "$(id -u)" = "0" ]; then
ESCALATION_TOOL="eval"
ESCALATION_TOOL_CHECKED=true
printf "%b\n" "${CYAN}Running as root, no escalation needed${RC}"
return 0
fi
if [ -z "$ESCALATION_TOOL_CHECKED" ]; then
ESCALATION_TOOLS='sudo doas'
for tool in ${ESCALATION_TOOLS}; do