From 8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0 Mon Sep 17 00:00:00 2001 From: Raf Czlonka Date: Mon, 8 Oct 2018 21:50:03 +0100 Subject: [PATCH] installer: make sure shell in /etc/shells is not commented Otherwise we risk a situation where a full path to `zsh` is commented, i.e.: #/usr/local/bin/zsh --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 659cd9447..7eea2e748 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -97,7 +97,7 @@ setup_shell() { # If this platform provides a "chsh" command (not Cygwin), do it, man! if command_exists chsh; then echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" - if ! chsh -s $(grep /zsh$ /etc/shells | tail -1); then + if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then error "chsh command unsuccessful. Change your default shell manually." fi # Else, suggest the user do so manually.