New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message for `rbenv shell` #981

Merged
merged 2 commits into from Dec 7, 2017

Conversation

Projects
None yet
2 participants
@mhinz
Contributor

mhinz commented Mar 23, 2017

Shell integration is not enabled by default. This means that, from all the commands from rbenv commands, only "shell" won't work right away.

Replace "no such command" with a more descriptive message that points to rbenv init instead.

@@ -105,7 +105,13 @@ case "$command" in
;;
* )
command_path="$(command -v "rbenv-$command" || true)"
[ -n "$command_path" ] || abort "no such command \`$command'"
if [ -z "$command_path" ]; then
if [ "$command" == "shell" ]; then

This comment has been minimized.

@mislav

mislav Nov 29, 2017

Member

Could we have a test that covers this case?

@mislav

mislav Nov 29, 2017

Member

Could we have a test that covers this case?

Show outdated Hide outdated libexec/rbenv Outdated

mhinz added some commits Mar 23, 2017

Better error message for `rbenv shell`
Shell integration is not enabled by default. This means that, from all the
commands from `rbenv commands`, only "shell" won't work right away.

Replace "no such command" with a more descriptive message that points to
`rbenv init` instead.
@mhinz

This comment has been minimized.

Show comment
Hide comment
@mhinz

mhinz Dec 7, 2017

Contributor

Okay, I changed the wording of the error message, added tests, and rebased.

Contributor

mhinz commented Dec 7, 2017

Okay, I changed the wording of the error message, added tests, and rebased.

@mislav mislav merged commit b943955 into rbenv:master Dec 7, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mhinz mhinz deleted the mhinz:shell-descriptive-error branch Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment