mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Tweak rbenv --version
output
This commit is contained in:
parent
3060578e3b
commit
1ebcbd92e2
2 changed files with 4 additions and 3 deletions
|
@ -60,7 +60,7 @@ shopt -u nullglob
|
|||
command="$1"
|
||||
case "$command" in
|
||||
"" | "-h" | "--help" )
|
||||
echo -e "rbenv $(rbenv---version)\n$(rbenv-help)" >&2
|
||||
echo -e "$(rbenv---version)\n$(rbenv-help)" >&2
|
||||
;;
|
||||
"-v" )
|
||||
exec rbenv---version
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
set -e
|
||||
[ -n "$RBENV_DEBUG" ] && set -x
|
||||
|
||||
version=v0.3.0
|
||||
version=0.3.0
|
||||
|
||||
cd "$RBENV_ROOT"
|
||||
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
||||
git_revision="${git_revision#v}"
|
||||
|
||||
echo ${git_revision:-$version}
|
||||
echo "rbenv ${git_revision:-$version}"
|
||||
|
|
Loading…
Reference in a new issue