1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-08 11:33:49 -05:00

Revert "Adapt conda.bash for bash associative array"

This commit is contained in:
Anton Petrov
2021-08-20 09:58:18 +03:00
committed by GitHub
parent 3738c2a282
commit 07609cc579

View File

@@ -34,22 +34,14 @@ make_shims() {
}
deregister_conda_shims() {
if [[ -v registered_shims[@] ]]; then # adapted for Bash 4.x's associative array (#1749)
for shim in ${!registered_shims[*]}; do
if conda_shim "${shim}" 1>&2; then
unset registered_shims[${shim}]
fi
done
else
local shim
local shims=()
for shim in ${registered_shims}; do
if ! conda_shim "${shim}" 1>&2; then
shims[${#shims[*]}]="${shim}"
fi
done
registered_shims=" ${shims[@]} "
fi
local shim
local shims=()
for shim in ${registered_shims}; do
if ! conda_shim "${shim}" 1>&2; then
shims[${#shims[*]}]="${shim}"
fi
done
registered_shims=" ${shims[@]} "
}
if conda_exists; then