Handle systems without rvm [Close #130]

This commit is contained in:
Yan Pritzker 2012-08-08 23:27:55 -07:00
parent e51f19809d
commit 7079ae1432

View File

@ -13,9 +13,11 @@
# Yan Pritzker <yan@pritzker.ws>
function rvm_info_for_prompt {
ruby_version=$(~/.rvm/bin/rvm-prompt)
if [ -n "$ruby_version" ]; then
echo "[$ruby_version]"
if [[ -d ~/.rvm/ ]]; then
ruby_version=$(~/.rvm/bin/rvm-prompt)
if [ -n "$ruby_version" ]; then
echo "[$ruby_version]"
fi
fi
}