mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 15:33:51 -05:00
activate: display setup instructions only with PYENV_VIRTUALENV_INIT=0
This fixes displaying the note, in case "init" has been run manually and/or the init is not in the expected place. It removes the unnecessary calls to "grep". pyenv-virtualenv-init will look at `$PYENV_SHELL` now, too. Tests have been adjusted/fixed.
This commit is contained in:
@@ -18,7 +18,7 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
shell="$1"
|
||||
shell="${1:-$PYENV_SHELL}"
|
||||
if [ -z "$shell" ]; then
|
||||
shell="$(ps c -p "$PPID" -o 'ucomm=' 2>/dev/null || true)"
|
||||
shell="${shell##-}"
|
||||
|
||||
Reference in New Issue
Block a user