Unverified Commit 7837ba6a authored by Webpage-gh's avatar Webpage-gh Committed by GitHub

fix(installer): don't use `sudo` when user is in Termux (#11591)

parent fcbdc330
......@@ -84,6 +84,11 @@ command_exists() {
user_can_sudo() {
# Check if sudo is installed
command_exists sudo || return 1
# Termux can't run sudo unless the device is rooted. Either way, `chsh` works
# without 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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment