From 3b95af3b63bffbb290c10316680d6195f6fcbf39 Mon Sep 17 00:00:00 2001 From: Rohitt Vashishtha Date: Fri, 11 Aug 2017 00:22:05 +0530 Subject: [PATCH] tools: Add virtual-env path exception for CygWin. --- tools/provision | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/provision b/tools/provision index 9f42be3..9132262 100755 --- a/tools/provision +++ b/tools/provision @@ -7,7 +7,15 @@ if [ ! -d "$BASEDIR/zulip-api-py2-venv" ]; then echo "Virtualenv created." 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=$? if [ $RVAL -ne 0 ]; then echo "Failed to activate virtualenv."