]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112431: Unconditionally call `hash -r` (GH-112432)
authorJames Morris <6653392+J-M0@users.noreply.github.com>
Tue, 28 Nov 2023 09:24:59 +0000 (04:24 -0500)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 09:24:59 +0000 (14:54 +0530)
commita194938f33a71e727e53490815bae874eece1460
treef5178e30a0478c9fe1f56f7a58ee2d539c2abe12
parentf14d741daa1b9e5b9c9fc1edba93d0fa92b5ba8d
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
`#!/bin/sh`-compatible shells like dash.
Lib/venv/scripts/common/activate