Permalink
Browse files

Bugfix: Detect rvm function load.

  • Loading branch information...
1 parent 5ac6dd3 commit 431e1791f624cd8558452f2d54ac139aacdb99b1 @wayneeseguin wayneeseguin committed Nov 15, 2010
Showing with 1 addition and 6 deletions.
  1. +1 −6 scripts/rvm
View
@@ -5,12 +5,7 @@
# http://github.com/wayneeseguin/rvm
# Is RVM loaded as a shell function already?
-if [[ -n "$BASH_VERSION" || "$ZSH_VERSION" ]] ; then
- \grep -q '^rvm ()' < <(declare -f)
-else
- declare -f | \grep -q '^rvm ()'
-fi
-if [[ $? -gt 0 || ${rvm_reload_flag:-0} -eq 1 ]] ; then
+if ! declare -f rvm > /dev/null || [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then

0 comments on commit 431e179

Please sign in to comment.