forked from extern/ohmyzsh
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>
This commit is contained in:
parent
cafa657469
commit
c4981bae0a
@ -24,12 +24,10 @@ main() {
|
|||||||
# which may fail on systems lacking tput or terminfo
|
# which may fail on systems lacking tput or terminfo
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
|
if command -v zsh >/dev/null 2>&1; then
|
||||||
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
|
|
||||||
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
|
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
unset CHECK_ZSH_INSTALLED
|
|
||||||
|
|
||||||
if [ ! -n "$ZSH" ]; then
|
if [ ! -n "$ZSH" ]; then
|
||||||
ZSH=~/.oh-my-zsh
|
ZSH=~/.oh-my-zsh
|
||||||
|
Loading…
Reference in New Issue
Block a user