]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112492)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 Nov 2023 09:43:38 +0000 (10:43 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 09:43:38 +0000 (15:13 +0530)
commit3c0d963379773890d03173915f8bf43c3a81aed1
tree388fd549c638c386d9dbc4a73f1b22a5270a5ddc
parent42dd2613fe4bc61e1f633078560f2d84a0a16c3f
[3.11] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112492)

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