Permalink
Browse files

Check for existance before grepping.

  • Loading branch information...
1 parent b206cc7 commit cdea1abae7666ec3594276b901c3876008fd3ace @wayneeseguin wayneeseguin committed Feb 26, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/install
View
@@ -184,7 +184,7 @@ if [[ "root" != "$(whoami)" ]] ; then
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
fi
-if grep '&& return' ~/.bashrc ; then
+if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc. Please remove it and refactor your profiles to be correct. If you have questions about this please visit #rvm on irc.freenode.net.\n\n"
fi

0 comments on commit cdea1ab

Please sign in to comment.