-
-
Save tra38/da6954ba8a62041d4973 to your computer and use it in GitHub Desktop.
which gem
This file contains 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