From 1fd1856afc4155ee47b3be9829b02d740f9a64d6 Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Mon, 30 May 2022 17:41:24 +0200 Subject: demo: check if we are in a virtualenv before overriding PYTHONPATH (#12916) --- demo/start.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'demo') diff --git a/demo/start.sh b/demo/start.sh index 96b3a2ceab..fdd75816fb 100755 --- a/demo/start.sh +++ b/demo/start.sh @@ -6,11 +6,12 @@ CWD=$(pwd) cd "$DIR/.." || exit -PYTHONPATH=$(readlink -f "$(pwd)") -export PYTHONPATH - - -echo "$PYTHONPATH" +# Do not override PYTHONPATH if we are in a virtual env +if [ "$VIRTUAL_ENV" = "" ]; then + PYTHONPATH=$(readlink -f "$(pwd)") + export PYTHONPATH + echo "$PYTHONPATH" +fi # Create servers which listen on HTTP at 808x and HTTPS at 848x. for port in 8080 8081 8082; do -- cgit 1.4.1