diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2023-11-04 18:38:46 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-11-04 18:38:46 -0700 |
commit | 4d908094fdc2a0c0e9a0a072eba213fab7adef43 (patch) | |
tree | 7c17e70bcdeebbe96c84d849bdf17882007480d8 /tools/install.sh | |
parent | 4b0bbc0b263a150eb9a9b59f196914629be06a9b (diff) | |
parent | 632ed413a9ce62747ded83d7736491b081be4b49 (diff) | |
download | zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.gz zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.bz2 zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.zip |
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-x | tools/install.sh | 4 |
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: |