mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Avoid the need to filter out envs in `pyenv-latest'
This commit is contained in:
parent
446411dc64
commit
72c5b034ca
1 changed files with 2 additions and 3 deletions
|
@ -31,7 +31,7 @@ exitcode=0
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
if [[ -z $FROM_KNOWN ]]; then
|
if [[ -z $FROM_KNOWN ]]; then
|
||||||
DEFINITION_CANDIDATES=( $(pyenv-versions --bare) )
|
DEFINITION_CANDIDATES=( $(pyenv-versions --bare --skip-envs) )
|
||||||
else
|
else
|
||||||
DEFINITION_CANDIDATES=( $(python-build --definitions ) )
|
DEFINITION_CANDIDATES=( $(python-build --definitions ) )
|
||||||
fi
|
fi
|
||||||
|
@ -48,10 +48,9 @@ IFS=$'\n'
|
||||||
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
||||||
grep -Ee "^$prefix_re[-.]" || true))
|
grep -Ee "^$prefix_re[-.]" || true))
|
||||||
|
|
||||||
#FIXME: <version>/envs/<virtualenv> should be excluded in Pyenv-Virtualenv via a hook
|
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | \
|
||||||
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d' -e '/\/envs\//d'));
|
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d'));
|
||||||
|
|
||||||
# Compose a sorting key, followed by | and original value
|
# Compose a sorting key, followed by | and original value
|
||||||
DEFINITION_CANDIDATES=(\
|
DEFINITION_CANDIDATES=(\
|
||||||
|
|
Loading…
Reference in a new issue