fix rbenv-which with system ruby

Don't have `command -v` abort the whole script prematurely.
This commit is contained in:
Roy Liu 2012-07-30 20:38:01 -04:00 committed by Mislav Marohnić
parent b5a26936e8
commit 99551dd1ec

View file

@ -50,7 +50,7 @@ fi
if [ "$RBENV_VERSION" = "system" ]; then if [ "$RBENV_VERSION" = "system" ]; then
PATH="$(remove_from_path "${RBENV_ROOT}/shims")" PATH="$(remove_from_path "${RBENV_ROOT}/shims")"
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND")" RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND" || true)"
else else
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}" RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
fi fi