Browse Source

make `shell` return an error code in case of failure

Fixes #274
pull/360/head^2
Mislav Marohnić 13 years ago
parent
commit
1f7722088d
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      libexec/rbenv-sh-shell

+ 7
- 4
libexec/rbenv-sh-shell View File

@ -23,10 +23,13 @@ fi
if [ "$version" = "--unset" ]; then
echo "unset RBENV_VERSION"
exit 1
exit
fi
# Make sure the specified version is installed.
rbenv-prefix "$version" >/dev/null
echo "export RBENV_VERSION=\"${version}\""
if rbenv-prefix "$version" >/dev/null; then
echo "export RBENV_VERSION=\"${version}\""
else
echo "return 1"
exit 1
fi

Loading…
Cancel
Save