Skip to content

Commit 6b9b7dc

Browse files
committed
First shot at Fixing #263
Signed-off-by: Jason Myers <[email protected]>
1 parent f9fc46c commit 6b9b7dc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

virtualenvwrapper.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,26 @@
4545
#
4646

4747
# Locate the global Python where virtualenvwrapper is installed.
48-
if [ "$VIRTUALENVWRAPPER_PYTHON" = "" ]
48+
if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
4949
then
5050
VIRTUALENVWRAPPER_PYTHON="$(command \which python)"
5151
fi
5252

5353
# Set the name of the virtualenv app to use.
54-
if [ "$VIRTUALENVWRAPPER_VIRTUALENV" = "" ]
54+
if [ "${VIRTUALENVWRAPPER_VIRTUALENV:-}" = "" ]
5555
then
5656
VIRTUALENVWRAPPER_VIRTUALENV="virtualenv"
5757
fi
5858

5959
# Set the name of the virtualenv-clone app to use.
60-
if [ "$VIRTUALENVWRAPPER_VIRTUALENV_CLONE" = "" ]
60+
if [ "${VIRTUALENVWRAPPER_VIRTUALENV_CLONE:-}" = "" ]
6161
then
6262
VIRTUALENVWRAPPER_VIRTUALENV_CLONE="virtualenv-clone"
6363
fi
6464

6565
# Define script folder depending on the platorm (Win32/Unix)
6666
VIRTUALENVWRAPPER_ENV_BIN_DIR="bin"
67-
if [ "$OS" = "Windows_NT" ] && ([ "$MSYSTEM" = "MINGW32" ] || [ "$MSYSTEM" = "MINGW64" ])
67+
if [ "${OS:-}" = "Windows_NT" ] && ([ "${MSYSTEM:-}" = "MINGW32" ] || [ "${MSYSTEM:-}" = "MINGW64" ])
6868
then
6969
# Only assign this for msys, cygwin use standard Unix paths
7070
# and its own python installation
@@ -73,7 +73,7 @@ fi
7373

7474
# Let the user override the name of the file that holds the project
7575
# directory name.
76-
if [ "$VIRTUALENVWRAPPER_PROJECT_FILENAME" = "" ]
76+
if [ "${VIRTUALENVWRAPPER_PROJECT_FILENAME:-}" = "" ]
7777
then
7878
export VIRTUALENVWRAPPER_PROJECT_FILENAME=".project"
7979
fi
@@ -83,7 +83,7 @@ fi
8383
export VIRTUALENVWRAPPER_WORKON_CD=${VIRTUALENVWRAPPER_WORKON_CD:-1}
8484

8585
# Remember where we are running from.
86-
if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
86+
if [ -z "${VIRTUALENVWRAPPER_SCRIPT:-}" ]
8787
then
8888
if [ -n "$BASH" ]
8989
then
@@ -108,10 +108,10 @@ fi
108108
# we are trying to change the state of the current shell, so we use
109109
# "builtin" for bash and zsh but "command" under ksh.
110110
function virtualenvwrapper_cd {
111-
if [ -n "$BASH" ]
111+
if [ -n "${BASH:-}" ]
112112
then
113113
builtin \cd "$@"
114-
elif [ -n "$ZSH_VERSION" ]
114+
elif [ -n "${ZSH_VERSION:-}" ]
115115
then
116116
builtin \cd -q "$@"
117117
else

0 commit comments

Comments
 (0)