mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Show which versions of Ruby have a command installed when rbenv-which fails
This commit is contained in:
parent
d257b562e5
commit
a62bd23ba2
1 changed files with 11 additions and 1 deletions
|
@ -7,6 +7,16 @@ RBENV_COMMAND_PATH="${HOME}/.rbenv/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND
|
|||
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
||||
echo "$RBENV_COMMAND_PATH"
|
||||
else
|
||||
echo "rbenv: $1: command not found" >&2
|
||||
echo "rbenv: $RBENV_COMMAND: command not found" >&2
|
||||
|
||||
versions="$(rbenv-whence "$RBENV_COMMAND" || true)"
|
||||
if [ -n "$versions" ]; then
|
||||
{ echo
|
||||
echo "The \`$1' command exists in these Ruby versions:"
|
||||
echo "$versions" | sed 's/^/ /g'
|
||||
echo
|
||||
} >&2
|
||||
fi
|
||||
|
||||
exit 127
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue