diff --git a/env.sh b/env.sh index 35367a1..c740c7d 100644 --- a/env.sh +++ b/env.sh @@ -6,18 +6,17 @@ die() { rm -r venv echo "$1" - exit 1 } setup() { echo "No venv found, creating..." - python3 -m venv venv || die "Unable to create venv" + if ! python3 -m venv venv ; then die "Unable to create venv"; return; fi echo "Activating venv..." activate echo "Updating pip..." - pip -q install -U pip || die "Unable to update pip" + if ! pip -q install -U pip ; then die "Unable to update pip"; return; fi echo "Installing requirements..." - pip -q install -r requirements.txt || die "Unable to install requirements" + if ! pip -q install -r requirements.txt ; then die "Unable to install requirements"; return; fi touch venv/.stamp echo "All done!" }