Change how oh-my-zsh check if zsh is installed

In stateless OS like Solus or Clear Linux, they didn't have /etc/shells.
This commit is contained in:
Yurizal Susanto 2017-01-28 08:07:07 +07:00 committed by GitHub
commit d89f829fb8

View file

@ -24,7 +24,7 @@ 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) CHECK_ZSH_INSTALLED=$(grep -E ^"${USER}:" /etc/passwd|cut -d : -f 7)
if [ ! $CHECK_ZSH_INSTALLED -ge 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