Skip to content

Commit

Permalink
disregard escalation tool variable if found as root
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Nov 8, 2024
1 parent 7f0d456 commit dcc32bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/tabs/common-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcc32bc

Please sign in to comment.