Browse files

Fix a bug that was causing rake to overwrite SHELL settings

The prezto install procedure now checks to make sure the user
doesn't have an alternative version of zsh installed before changing
the current shell preference with "chsh".
This may be the case when an user is already using zsh but on a
different version from the one shipped with OS X

Fixes #264
  • Loading branch information...
1 parent 9f9054f commit cf894af3eb23e1eca6c25ea980d1c7b25c6e8871 @FWFabio FWFabio committed Mar 21, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 Rakefile
@@ -146,8 +146,12 @@ def install_prezto
run %{ mkdir -p $HOME/.zsh.after }
run %{ mkdir -p $HOME/.zsh.prompts }
- puts "Setting zsh as your default shell"
- run %{ chsh -s /bin/zsh }
+ if ENV[SHELL].include? 'zsh' then
+ puts "Zsh is already configured as your shell of choice. Restart your session to load the new settings"
+ else
+ puts "Setting zsh as your default shell"
+ run %{ chsh -s /bin/zsh }
maletor Dec 16, 2013 Contributor

@skwp, curious if you would want to set this to /usr/local/bin/zsh.

skwp Dec 16, 2013 Owner

You're right, it should be the newer zsh installed by brew

+ end
def want_to_install? (section)

0 comments on commit cf894af

Please sign in to comment.