tools: Add virtual-env path exception for CygWin.

This commit is contained in:
Rohitt Vashishtha 2017-08-11 00:22:05 +05:30 committed by Tim Abbott
parent 4cd580d4fe
commit 3b95af3b63

View file

@ -7,7 +7,15 @@ if [ ! -d "$BASEDIR/zulip-api-py2-venv" ]; then
echo "Virtualenv created." echo "Virtualenv created."
fi fi
source $BASEDIR/zulip-api-py2-venv/bin/activate VENVBINDIR="bin"
if [[ "$OSTYPE" == "cygwin" ]]; then
# POSIX compatibility layer and Linux environment emulation for Windows
# Virtual uses /Scripts instead of /bin on Windows.
# Read https://virtualenv.pypa.io/en/stable/userguide/
VENVBINDIR="Scripts"
fi
source $BASEDIR/zulip-api-py2-venv/$VENVBINDIR/activate
RVAL=$? RVAL=$?
if [ $RVAL -ne 0 ]; then if [ $RVAL -ne 0 ]; then
echo "Failed to activate virtualenv." echo "Failed to activate virtualenv."