Closed
Description
Bug report
Bug description:
The venv/scripts/common/activate script calls hash -r
in two places to make sure the shell picks up the environment changes the script makes. Before that, it checks to see if the shell running the script is bash or zsh.
cpython/Lib/venv/scripts/common/activate
Lines 20 to 22 in fb202af
cpython/Lib/venv/scripts/common/activate
Lines 75 to 77 in fb202af
hash -r
is specified by POSIX and is not exclusive to bash and zsh. This guard will prevent the script from calling hash -r
in other #!/bin/sh
-compatible shells like dash.
CPython versions tested on:
3.11, 3.12, 3.13
Operating systems tested on:
macOS, Windows