]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112493)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 Nov 2023 09:44:03 +0000 (10:44 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 09:44:03 +0000 (15:14 +0530)
commit49494c472161976dec483eb09e1bad0378758d3f
tree137d9a4bd427a8b79a8f09c081f2305f648472c3
parente28722e7721d33898013778a00e4d3eed8fd1be6
[3.12] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112493)

gh-112431: Unconditionally call `hash -r` (GH-112432)

The `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.

`hash -r` is specified by POSIX and is not exclusive to bash and zsh.
This guard prevents the script from calling `hash -r` in other
`GH-!/bin/sh`-compatible shells like dash.
(cherry picked from commit a194938f33a71e727e53490815bae874eece1460)

Co-authored-by: James Morris <6653392+J-M0@users.noreply.github.com>
Lib/venv/scripts/common/activate