Commit 8e10ac4d authored by Raf Czlonka's avatar Raf Czlonka Committed by Marc Cornellà
Browse files

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
parent 73f29087
...@@ -97,7 +97,7 @@ setup_shell() { ...@@ -97,7 +97,7 @@ setup_shell() {
# If this platform provides a "chsh" command (not Cygwin), do it, man! # If this platform provides a "chsh" command (not Cygwin), do it, man!
if command_exists chsh; then if command_exists chsh; then
echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" 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." error "chsh command unsuccessful. Change your default shell manually."
fi fi
# Else, suggest the user do so manually. # Else, suggest the user do so manually.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment