Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure SCM Breeze is loaded after RVM when wrapping the cd command

  • Loading branch information...
commit 5b7a2c43070c704379b620575779caad59c931e6 1 parent d1a9df3
@ndbroadbent authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/git/shell_shortcuts.sh
View
9 lib/git/shell_shortcuts.sh
@@ -16,6 +16,15 @@ if [ "$shell_command_wrapping_enabled" = "true" ] || [ "$bash_command_wrapping_e
for cmd in $(echo $scmb_wrapped_shell_commands); do
if [ "${scmbDebug:-}" = "true" ]; then echo "SCMB: Wrapping $cmd..."; fi
+ # Special check for 'cd', to make sure SCM Breeze is loaded after RVM
+ if [ "$cmd" = 'cd' ]; then
+ if [ -e "$HOME/.rvm" ] && ! type rvm > /dev/null 2>&1; then
+ echo -e "\033[0;31mSCM Breeze must be loaded \033[1;31mafter\033[0;31m RVM, otherwise there will be a conflict when RVM wraps the 'cd' command.\033[0m"
+ echo -e "\033[0;31mPlease move the line that loads SCM Breeze to the bottom of your ~/.bashrc\033[0m"
+ continue
+ fi
+ fi
+
case "$(type $cmd 2>&1)" in
# Don't do anything if command already aliased, or not found.
Please sign in to comment.
Something went wrong with that request. Please try again.