mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-16 23:33:45 -05:00
Use exitcode from pyenv-version-name in pyenv-version, do not halt
This commit is contained in:
@@ -72,6 +72,19 @@ pyenv: version \`1.2' is not installed
|
||||
OUT
|
||||
}
|
||||
|
||||
pyenv-version-name-without-stderr() {
|
||||
pyenv-version-name 2>/dev/null
|
||||
}
|
||||
|
||||
@test "one missing version (without stderr)" {
|
||||
create_version "3.4.2"
|
||||
PYENV_VERSION="1.2:3.4.2" run pyenv-version-name-without-stderr
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
3.4.2
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "version with prefix in name" {
|
||||
create_version "2.7.6"
|
||||
cat > ".python-version" <<<"python-2.7.6"
|
||||
|
||||
Reference in New Issue
Block a user