Skip to content
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

Allow unfunctioing pydoc to fail #2049

Merged
merged 2 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog/2049.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Allow unfunctioning of pydoc to fail freely so that virtualenvs can be
activated under Zsh with set -e (since otherwise ``unset -f`` and
``unfunction`` exit with 1 if the function does not exist in Zsh) - by
:user:`d125q`.
2 changes: 1 addition & 1 deletion src/virtualenv/activation/bash/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ "${BASH_SOURCE-}" = "$0" ]; then
fi

deactivate () {
unset -f pydoc >/dev/null 2>&1
unset -f pydoc >/dev/null 2>&1 || true

# reset old environment variables
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
Expand Down