Allow for possible global commands

`python` and `rspec` might exist globally
This commit is contained in:
Ivan Pozdeev 2024-12-16 02:19:59 +03:00
parent be28613b09
commit 23319dc3a0

View File

@ -16,10 +16,10 @@ create_executable() {
@test "fails with invalid version" {
export PYENV_VERSION="3.4"
run pyenv-exec python -V
run pyenv-exec nonexistent
assert_failure <<EOF
pyenv: version \`3.4' is not installed (set by PYENV_VERSION environment variable)
pyenv: python: command not found
pyenv: nonexistent: command not found
EOF
}
@ -27,10 +27,10 @@ EOF
mkdir -p "$PYENV_TEST_DIR"
cd "$PYENV_TEST_DIR"
echo 2.7 > .python-version
run pyenv-exec rspec
run pyenv-exec nonexistent
assert_failure <<EOF
pyenv: version \`2.7' is not installed (set by $PWD/.python-version)
pyenv: rspec: command not found
pyenv: nonexistent: command not found
EOF
}