mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 13:22:28 +00:00
disregard escalation tool variable if found as root
This commit is contained in:
parent
7f0d456c68
commit
dcc32bca48
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user