Skip to content

Commit

Permalink
remove duplicate check
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Nov 11, 2024
1 parent eac4552 commit 78be6cb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/tabs/common-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ checkAURHelper() {
}

checkEscalationTool() {
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
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

ESCALATION_TOOLS='sudo doas'
for tool in ${ESCALATION_TOOLS}; do
if command_exists "${tool}"; then
Expand Down

0 comments on commit 78be6cb

Please sign in to comment.