1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-15 06:43:53 -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:
Mislav Marohnić
2015-11-13 22:57:22 -05:00
parent 09b18cf6f5
commit 3405c4d03c
2 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,12 @@ create_executable() {
assert_failure "rbenv: rake: command not found"
}
@test "no executable found for system version" {
export PATH="$(path_without "rake")"
RBENV_VERSION=system run rbenv-which rake
assert_failure "rbenv: rake: command not found"
}
@test "executable found in other versions" {
create_executable "1.8" "ruby"
create_executable "1.9" "rspec"