Browse Source

Merge pull request #2035 from pyenv/revert-2027-master

Revert "Adapt conda.bash for bash associative array"
pull/2037/head
Anton Petrov 3 years ago
committed by GitHub
parent
commit
4f8b15fecd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 16 deletions
  1. +8
    -16
      pyenv.d/rehash/conda.bash

+ 8
- 16
pyenv.d/rehash/conda.bash 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

Loading…
Cancel
Save