mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #756 from blueyed/version-origin-with-non-installed
Display version origin with non-installed versions
This commit is contained in:
commit
3b6faa8531
5 changed files with 5 additions and 5 deletions
|
@ -23,6 +23,6 @@ if version_exists "$RBENV_VERSION"; then
|
||||||
elif version_exists "${RBENV_VERSION#ruby-}"; then
|
elif version_exists "${RBENV_VERSION#ruby-}"; then
|
||||||
echo "${RBENV_VERSION#ruby-}"
|
echo "${RBENV_VERSION#ruby-}"
|
||||||
else
|
else
|
||||||
echo "rbenv: version \`$RBENV_VERSION' is not installed" >&2
|
echo "rbenv: version \`$RBENV_VERSION' is not installed (set by $(rbenv-version-origin))" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -52,7 +52,7 @@ done
|
||||||
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
||||||
echo "$RBENV_COMMAND_PATH"
|
echo "$RBENV_COMMAND_PATH"
|
||||||
elif ! [ -d "${RBENV_ROOT}/versions/${RBENV_VERSION}" ]; then
|
elif ! [ -d "${RBENV_ROOT}/versions/${RBENV_VERSION}" ]; then
|
||||||
echo "rbenv: version \`$RBENV_VERSION' is not installed" >&2
|
echo "rbenv: version \`$RBENV_VERSION' is not installed (set by $(rbenv-version-origin))" >&2
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "rbenv: $RBENV_COMMAND: command not found" >&2
|
echo "rbenv: $RBENV_COMMAND: command not found" >&2
|
||||||
|
|
|
@ -17,7 +17,7 @@ create_executable() {
|
||||||
@test "fails with invalid version" {
|
@test "fails with invalid version" {
|
||||||
export RBENV_VERSION="2.0"
|
export RBENV_VERSION="2.0"
|
||||||
run rbenv-exec ruby -v
|
run rbenv-exec ruby -v
|
||||||
assert_failure "rbenv: version \`2.0' is not installed"
|
assert_failure "rbenv: version \`2.0' is not installed (set by RBENV_VERSION environment variable)"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "completes with names of executables" {
|
@test "completes with names of executables" {
|
||||||
|
|
|
@ -49,7 +49,7 @@ setup() {
|
||||||
|
|
||||||
@test "missing version" {
|
@test "missing version" {
|
||||||
RBENV_VERSION=1.2 run rbenv-version-name
|
RBENV_VERSION=1.2 run rbenv-version-name
|
||||||
assert_failure "rbenv: version \`1.2' is not installed"
|
assert_failure "rbenv: version \`1.2' is not installed (set by RBENV_VERSION environment variable)"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "version with prefix in name" {
|
@test "version with prefix in name" {
|
||||||
|
|
|
@ -59,7 +59,7 @@ create_executable() {
|
||||||
@test "version not installed" {
|
@test "version not installed" {
|
||||||
create_executable "2.0" "rspec"
|
create_executable "2.0" "rspec"
|
||||||
RBENV_VERSION=1.9 run rbenv-which rspec
|
RBENV_VERSION=1.9 run rbenv-which rspec
|
||||||
assert_failure "rbenv: version \`1.9' is not installed"
|
assert_failure "rbenv: version \`1.9' is not installed (set by RBENV_VERSION environment variable)"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "no executable found" {
|
@test "no executable found" {
|
||||||
|
|
Loading…
Reference in a new issue