🐛 fix(activation): silence deactivate hash -r under set -e (#3152) Sourcing the bash/zsh activation script and later running `deactivate` could abort the shell when strict mode is on. 🐚 Under `set -euo pipefail` with shell command hashing disabled (`set +h`), the `hash -r` call inside `deactivate()` returns non-zero, and `2>/dev/null` only hides its stderr, not its exit status, so the failing command tears down the session. The `deactivate()` call now appends `|| true`, the same guard the trailing activation-time `hash -r` already carried. This brings the two `hash -r` sites into line and mirrors the equivalent CPython `venv` change in gh-149701. The fix is confined to the bash/zsh activator; behavior under non-strict shells is unchanged since `hash -r` already succeeded there. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
A tool for creating isolated virtual python environments.
Everyone interacting in the virtualenv project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PSF Code of Conduct.