Don't include system in rbenv versions --bare output

This commit is contained in:
Sam Stephenson 2012-12-12 21:38:57 -06:00
parent 1f7722088d
commit 9289af0132

View file

@ -6,10 +6,12 @@ if [ "$1" = "--bare" ]; then
hit_prefix="" hit_prefix=""
miss_prefix="" miss_prefix=""
current_version="" current_version=""
include_system=""
else else
hit_prefix="* " hit_prefix="* "
miss_prefix=" " miss_prefix=" "
current_version="$(rbenv-version-name || true)" current_version="$(rbenv-version-name || true)"
include_system="1"
fi fi
print_version() { print_version() {
@ -20,8 +22,8 @@ print_version() {
fi fi
} }
# detect if there is system ruby # Include "system" in the non-bare output, if it exists
if RBENV_VERSION=system rbenv-which ruby >/dev/null 2>&1; then if [ -n "$include_system" ] && RBENV_VERSION=system rbenv-which ruby >/dev/null 2>&1; then
print_version system print_version system
fi fi