File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ create_venv() {
1717
1818# Check that Python version supports venv
1919if ! python -c ' import venv' 1> /dev/null 2> /dev/null; then
20- echo " \033[1;33mWARNING : Python version must be > 3.3 to create a virtual environment.\033[0m "
20+ echo " WARNING : Python version must be > 3.3 to create a virtual environment."
2121 touch " $STATE_FILE "
2222 exit 1
2323fi
@@ -31,15 +31,19 @@ if [ -d "$VENV_DIR" ]; then
3131 exit 0
3232 fi
3333 if ! is_devbox_venv " $VENV_DIR " ; then
34- echo " \033[1;33mWARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python.\033[0m"
35- read -p " Do you want to overwrite it? (y/n) " -n 1 -r
34+ echo " WARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python."
35+ echo " Do you want to overwrite it? (y/n)"
36+ read reply
3637 echo
37- if [[ $REPLY =~ ^[Yy]$ ]]; then
38+ if [[ $reply =~ ^[Yy]$ ]]; then
3839 echo " Overwriting existing virtual environment..."
3940 create_venv
40- else
41+ elif [[ $reply =~ ^[Nn]$ ]] ; then
4142 echo " Using your existing virtual environment. We recommend changing \$ VENV_DIR to a different location"
4243 touch " $STATE_FILE "
44+ exit 0
45+ else
46+ echo " Invalid input. Exiting..."
4347 exit 1
4448 fi
4549 fi
You can’t perform that action at this time.
0 commit comments