summaryrefslogtreecommitdiff
path: root/tools/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-xtools/install.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/install.sh b/tools/install.sh
index f4ef16a0c..fcfbcf778 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -84,6 +84,10 @@ command_exists() {
user_can_sudo() {
# Check if sudo is installed
command_exists sudo || return 1
+ # Termux can't run sudo, so we can detect it and exit the function early.
+ case "$PREFIX" in
+ *com.termux*) return 1 ;;
+ esac
# The following command has 3 parts:
#
# 1. Run `sudo` with `-v`. Does the following: