diff --git a/conf/type/__rvm/explorer/state b/conf/type/__rvm/explorer/state index d0da0d86..f43f5509 100755 --- a/conf/type/__rvm/explorer/state +++ b/conf/type/__rvm/explorer/state @@ -19,8 +19,18 @@ # user="$__object_id" -if su - $user -c "[ -d \"\$HOME/.rvm\" ]" ; then - echo "present" + +# RVM behaves differently if root is the username / uid == 0 +if [ "$user" = "root" ]; then + if [ -d /usr/local/rvm ]; then + echo present + else + echo absent + fi else - echo "absent" + if su - $user -c "[ -d \"\$HOME/.rvm\" ]" ; then + echo "present" + else + echo "absent" + fi fi