Skip to content

[3.12] gh-112431: Unconditionally call hash -r (GH-112432) #112493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 28, 2023

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 a194938)

Co-authored-by: James Morris [email protected]

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 a194938)

Co-authored-by: James Morris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants