Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
7837ba6a
Unverified
Commit
7837ba6a
authored
Mar 31, 2023
by
Webpage-gh
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(installer): don't use `sudo` when user is in Termux (#11591)
Co-authored-by:
Marc Cornellà
<
hello@mcornella.com
>
parent
fcbdc330
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
install.sh
tools/install.sh
+5
-0
No files found.
tools/install.sh
View file @
7837ba6a
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment