Skip to content

Commit

Permalink
Allow unfunctioing pydoc to fail (#2049)
Browse files Browse the repository at this point in the history
  • Loading branch information
d125q authored Jan 12, 2021
1 parent a4025d6 commit 26943f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 26943f6

Please sign in to comment.