mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Revert "Adapt conda.bash for bash associative array"
This commit is contained in:
parent
3738c2a282
commit
07609cc579
1 changed files with 8 additions and 16 deletions
|
@ -34,22 +34,14 @@ make_shims() {
|
||||||
}
|
}
|
||||||
|
|
||||||
deregister_conda_shims() {
|
deregister_conda_shims() {
|
||||||
if [[ -v registered_shims[@] ]]; then # adapted for Bash 4.x's associative array (#1749)
|
local shim
|
||||||
for shim in ${!registered_shims[*]}; do
|
local shims=()
|
||||||
if conda_shim "${shim}" 1>&2; then
|
for shim in ${registered_shims}; do
|
||||||
unset registered_shims[${shim}]
|
if ! conda_shim "${shim}" 1>&2; then
|
||||||
fi
|
shims[${#shims[*]}]="${shim}"
|
||||||
done
|
fi
|
||||||
else
|
done
|
||||||
local shim
|
registered_shims=" ${shims[@]} "
|
||||||
local shims=()
|
|
||||||
for shim in ${registered_shims}; do
|
|
||||||
if ! conda_shim "${shim}" 1>&2; then
|
|
||||||
shims[${#shims[*]}]="${shim}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
registered_shims=" ${shims[@]} "
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if conda_exists; then
|
if conda_exists; then
|
||||||
|
|
Loading…
Reference in a new issue