Open kevinslin opened 9 years ago
Found the error:
if [ -e "$HOME/.rvm" ] && ! type rvm > /dev/null 2>&1; then
needs to be if [ -e "$HOME/.rvm" ] && type rvm > /dev/null 2>&1; then
Because, in posix shells, return value of 0 is true:
The if compound-list shall be executed; if its exit status is zero, the then compound-list shall be executed and the command shall complete. Otherwise, each elif compound-list shall be executed, in turn, and if its exit status is zero, the then compound-list shall be executed and the command shall complete. Otherwise, the else compound-list shall be executed.
type would return 0 = true, and then the echo statements would run.
The following warning will always play, even if the condition is satisfied.
SCM Breeze must be loaded after RVM, otherwise there will be a conflict when RVM wraps the 'cd' command.
Script should check if rvm has been sourced and only report warning if true.