Permalink
Browse files

Merge pull request #265 from duhanebel/zsh_install_check

Fix a bug that was causing rake to overwrite SHELL settings
  • Loading branch information...
2 parents 9f9054f + cf894af commit 6f07653bccfe6ac852451ed7686c5357b27afdb7 @skwp committed Mar 21, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 Rakefile
View
@@ -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 }
+ end
end
def want_to_install? (section)

0 comments on commit 6f07653

Please sign in to comment.