Christian Fredrik Johnsen 09fbed1d4f fix: pyenv-rehash | do NOT create conda_exclusion_list if conda is not installed.
I was doing some debugging with PYENV_DEBUG=1 and noticed that a lot of
work was being done in conda.bash, even though I had not installed any
conda versions like `mambaforge`.

The solution is pretty simple, put all the code inside an if-block.
This aligns with what @varikin found in his pull request #3037

Additionally, I have refactored the code slightly for readability
(created function `build_conda_exclusion_list`), and added comments
which should make it easier to understand what's going on.

This commit simplifies debugging and should reduce the execution time of

```bash
eval "$(pyenv init -)"
```

slightly.
2025-02-13 08:31:48 +03:00
..