That allowed use of so that RVM wouldn't break when using both set -e and cd'ing into a project directory that has a .ruby-version/.ruby-gemset:
# Load RVM into a shell session *as a function* if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then # First try to load from a user install source "$HOME/.rvm/scripts/rvm" elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then # Then try to load from a root install source "/usr/local/rvm/scripts/rvm" else printf "ERROR: An RVM installation was not found.\n" fi
Will now break the script, exiting when you call the cd command (issue #3017).
set -e cd /some/path/to/project
The workaround provided by Michal Papis is to use the builtin cd and rvm use instead which seems to work:
Edited 2014-09-04 to provide solution from Michal Papis.
set -e builtin cd /some/path/to/project rvm use .