mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 22:33:52 -05:00
Fix error message when command is not found for "system" version
If `foo` didn't exist and `RBENV_VERSION=system rbenv which foo` was
called, the error message used to be misleading:
rbenv: version `system' is not installed
Instead, have the error message simply say that the command was not found.
Fixes #770
This commit is contained in:
@@ -51,7 +51,7 @@ done
|
||||
|
||||
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
||||
echo "$RBENV_COMMAND_PATH"
|
||||
elif ! [ -d "${RBENV_ROOT}/versions/${RBENV_VERSION}" ]; then
|
||||
elif [ "$RBENV_VERSION" != "system" ] && [ ! -d "${RBENV_ROOT}/versions/${RBENV_VERSION}" ]; then
|
||||
echo "rbenv: version \`$RBENV_VERSION' is not installed (set by $(rbenv-version-origin))" >&2
|
||||
exit 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user