Skip to content

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 6653392+J-M0@users.noreply.github.com

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 <6653392+J-M0@users.noreply.github.com>
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