Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
skip virtualenv check if already activated (trailofbits#863)
Browse files Browse the repository at this point in the history
This allows the user to choose their virtualenv method, e.g.
[Pipenv](https://docs.pipenv.org/).
  • Loading branch information
mattieb authored and dguido committed Apr 23, 2018
1 parent 1a58370 commit a8b64af
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions algo
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

set -e

ACTIVATE_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/env/bin/activate"
if [ -f "$ACTIVATE_SCRIPT" ]
if [ -z ${VIRTUAL_ENV+x} ]
then
source $ACTIVATE_SCRIPT
else
echo "$ACTIVATE_SCRIPT not found. Did you follow documentation to install dependencies?"
exit 1
ACTIVATE_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/env/bin/activate"
if [ -f "$ACTIVATE_SCRIPT" ]
then
source $ACTIVATE_SCRIPT
else
echo "$ACTIVATE_SCRIPT not found. Did you follow documentation to install dependencies?"
exit 1
fi
fi

SKIP_TAGS="_null encrypted"
Expand Down

0 comments on commit a8b64af

Please sign in to comment.