I’ve been advised to remove the return command from my bashrc file in order to allow Ruby Version Manager to function properly. Do I simply delete the return command, or do I replace it with some other command? I am hesitant to mess with my System-wide shell without some proper direction. But I would really like to get RVM working as it is a time saver.
My bashrc is located in the etc directory and looks like this:
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
if [[ -s /Users/justinz/.rvm/scripts/rvm ]] ; then source /Users/justinz/.rvm/scripts/rvm ; fi
The last line, is an insert, described in the RVM installation.
I wouldn’t. That
returnis probably there for a good reason. It obviously doesn’t want to execute anything after that if thePS1variable is empty.I would just move the inserted line up above the
ifstatement.In addition, if that’s actually in the system-wide
bashrcfile, you should be using something like:rather than:
I’m sure Bob and Alice don’t want to run your startup script.
If it’s actually your
bashrcfile (in/Users/justinz), you can ignore that last snippet above.