From 08401b14c196240a5a5a45d908ef5a591af42539 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 28 Nov 2020 05:00:45 -0500 Subject: [PATCH] precheck if venv exists instead of soft failing --- bin/build_pip.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/build_pip.sh b/bin/build_pip.sh index b011ad7c..532a8058 100755 --- a/bin/build_pip.sh +++ b/bin/build_pip.sh @@ -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"