Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 1.16.9
Fetching contributors…

Cannot retrieve contributors at this time

executable file 57 lines (45 sloc) 1.512 kb
#!/usr/bin/env bash
export HOME="${HOME%%+(\/)}" # Remove trailing slashes if they exist on HOME
if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
for rvmrc in /etc/rvmrc "$HOME/.rvmrc"
do
if [[ -f "$rvmrc" ]]
then
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
return 1
else
source "$rvmrc"
fi
fi
done
fi
export rvm_path
if [[ -z "${rvm_path:-}" ]]
then
if (( UID == 0 )) && [[ -d "/usr/local/rvm" ]]
then rvm_path="/usr/local/rvm"
elif [[ -d "${HOME}/.rvm" ]]
then rvm_path="${HOME}/.rvm"
elif [[ -d "/usr/local/rvm" ]]
then rvm_path="/usr/local/rvm"
else echo "Can't find rvm install!" 1>&2 ; exit 1
fi
fi
true ${rvm_scripts_path:="$rvm_path/scripts"}
true ${rvm_environments_path:="$rvm_path/environments"}
if [[ -n "$rvm_path" && -s "$rvm_scripts_path/rvm" ]]; then
source "$rvm_scripts_path/rvm" > /dev/null 2>&1
elif [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
source "$HOME/.rvm/scripts/rvm" > /dev/null 2>&1
elif [[ -s "/usr/local/rvm/scripts/rvm" ]]; then
source "/usr/local/rvm/scripts/rvm" > /dev/null 2>&1
else
echo "Unable to detect rvm, please manually set the rvm_path env variable." >&2
exit 1
fi
[[ -s "$rvm_environments_path/default" ]] && source "$rvm_environments_path/default"
rvm_promptless=1 rvm rvmrc load > /dev/null 2>&1
exec ruby "$@"
Jump to Line
Something went wrong with that request. Please try again.