-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
venv/scripts/common/activate should unconditionally call hash -r
#112431
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
Labels
stdlib
Python modules in the Lib dir
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Comments
vsajip
pushed a commit
that referenced
this issue
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 `#!/bin/sh`-compatible shells like dash.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
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]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
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]>
vsajip
pushed a commit
that referenced
this issue
Nov 28, 2023
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 a194938) Co-authored-by: James Morris <[email protected]>
vsajip
pushed a commit
that referenced
this issue
Nov 28, 2023
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 a194938) Co-authored-by: James Morris <[email protected]>
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
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.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
stdlib
Python modules in the Lib dir
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
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 callinghash -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
Linked PRs
hash -r
#112432hash -r
(GH-112432) #112492hash -r
(GH-112432) #112493The text was updated successfully, but these errors were encountered: