1
0
Fork 0
mirror of synced 2024-05-13 17:03:19 +12:00

precheck if venv exists instead of soft failing

This commit is contained in:
Nick Sweeting 2020-11-28 05:00:45 -05:00
parent d32aad5123
commit 08401b14c1

View file

@ -12,7 +12,11 @@ IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
source "$REPO_DIR/.venv/bin/activate" || true
if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then
source "$REPO_DIR/.venv/bin/activate"
else
echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv"
fi
cd "$REPO_DIR"