c4981bae0a91ce6d4b0717558342584cc6491199
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
installer: check if zsh in path instead of /etc/shells
Fixes #4955
Closes #5931
Closes #6398
Co-authored-by: Void <vst4rbot@gmail.com>
Co-authored-by: Kaleb Elwert <belak@coded.io>
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 840a0d7d88ab9d2db45955843f22fbd7d5ddb080..1a0a8e6db468b0683599a92fa3a511cb5221e4c9 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -24,12 +24,10 @@ main() {
6 # which may fail on systems lacking tput or terminfo
7 set -e
8
9- CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
10- if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
11+ if command -v zsh >/dev/null 2>&1; then
12 printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
13 exit
14 fi
15- unset CHECK_ZSH_INSTALLED
16
17 if [ ! -n "$ZSH" ]; then
18 ZSH=~/.oh-my-zsh