diff options
author | Raf Czlonka <rczlonka@gmail.com> | 2018-10-08 21:50:03 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-06-03 17:18:23 +0200 |
commit | 8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0 (patch) | |
tree | e94036546e86164204732ca2271535965110a822 /tools/install.sh | |
parent | 73f29087f99e2e6630dcc5954db1240e8c885147 (diff) | |
download | zsh-8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0.tar.gz zsh-8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0.tar.bz2 zsh-8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0.zip |
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
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-x | tools/install.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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. |