From fc136ebeec16cd68d2ca630c1687f1106cc507d6 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Mon, 18 Jan 2016 23:50:52 +1100 Subject: Homogenize test syntax, add explanation of it --- virtualenv_embedded/activate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'virtualenv_embedded') diff --git a/virtualenv_embedded/activate.sh b/virtualenv_embedded/activate.sh index 4dff986..ecf30a7 100644 --- a/virtualenv_embedded/activate.sh +++ b/virtualenv_embedded/activate.sh @@ -5,6 +5,7 @@ deactivate () { unset -f pydoc # reset old environment variables + # ! [ -z ${VAR+_} ] returns true if VAR is declared at all if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then PATH="$_OLD_VIRTUAL_PATH" export PATH @@ -47,7 +48,7 @@ PATH="$VIRTUAL_ENV/__BIN_NAME__:$PATH" export PATH # unset PYTHONHOME if set -if ! [ -z "${PYTHONHOME+x}" ] ; then +if ! [ -z "${PYTHONHOME+_}" ] ; then _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME" unset PYTHONHOME fi -- cgit v1.2.1