Created
October 23, 2012 17:38
-
-
Save spellancer/3940268 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem () { | |
typeset result | |
( | |
typeset rvmrc | |
rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc") | |
if [[ -n "${rvm_prefix:-}" ]] && ! [[ "$HOME/.rvmrc" -ef "${rvm_prefix}/.rvmrc" ]] | |
then | |
rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc") | |
fi | |
for rvmrc in "${rvm_rvmrc_files[@]}" | |
do | |
[[ -s "${rvmrc}" ]] && source "${rvmrc}" || true | |
done | |
unset rvm_rvmrc_files | |
command gem "$@" | |
) || result=$? | |
hash -r | |
return ${result:-0} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment